Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 UPDATE performance

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-15 : 21:47:47
BIll writes "I have two tables. Both have the identical number of rows (say, 200K rows). The first table has 2 columns, both int, and one of the two is the PK. The second table has 200 columns among which are the same two columns as in table 1 and the same PK in table 1. However, column2 in Table1 is column143 in Table 2.

I do a simple update like so:

UPDATE table1 SET column2=0

UPDATE table2 SET column143=0

The first query takes 9 seconds on mediocre hardware. On the same system, the second query takes 5 min 45 sec!!

Question 1: Why the huge performance disparity?

Question 2: What do I do to improve performance in query 2?

Using SQL Server 7.0, Win2000."
   

- Advertisement -