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.
Author |
Topic |
sqlilliterate
Starting Member
40 Posts |
Posted - 2008-01-23 : 13:02:14
|
Hi,My friend expresses his concern over the performance of his update query. He says the execution time takes around 120 ms.the query is looking likeUpdate table set col1 = 'value', col2 = 'val', col3= 'val'............ col40='val'where col1 = 'value' and col2 = 'value' and col3 = 'val' and col4 = 'val'He says he's updating around 40 columns at a stretch with filter conditions as shown, and only 1 row is getting affected by this.Where the col1, col2,col3 n col4 are composite primary keys and have default clustered indexes created on them.Is that the execution time he say is really a performance issue ? I'm confused on thisExperts, pls post your comments and any tips on improving update query in general will immensely help.thanks,:) |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-01-23 : 22:25:20
|
Checked execution plan? |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-01-24 : 07:10:39
|
I wouldn't say 120 ms id particuarly slow. Is one of the updates pointing at a key column? If it does this could be causing a slow performance . Basically , if a key column is updated , a delete happens than an INSERT even though the value is the same.Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
|
|
|
|
|