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 |
|
zekmoe
Starting Member
5 Posts |
Posted - 2008-06-27 : 15:23:38
|
| I'm running a similar update statement on 2 copies of the same db (sql server 2000). On the test instance, the update completes in about 7 minutes on 4.5 mill rows. In the prod instance, it hangs, and shows 5 threads, all locked. It looks like they have the same pid and are locking themselves. Never looks like it will complete after this. Being new to SQL Server, what would possibly cause this? I can take a copy of the db, move it to the one instance and it succeeds in the 7 minutes, another to the second instance and it fails. Or at least locks and hangs?Guidence from the experienced, please? ThanksBobNot a downstroke, fistpicker |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-06-28 : 22:55:39
|
| Try add maxdop = 1 in your update statement. |
 |
|
|
maninder
Posting Yak Master
100 Posts |
Posted - 2008-06-29 : 11:51:10
|
| Right, you can use that also check for Locking on then PROD Server.TRY Locking the Table during the UPDATE with TABLOCKX (Exclusive Lock on Tables)Maninder |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-06-29 : 14:30:39
|
| Why lock whole table for updating? |
 |
|
|
|
|
|