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 |
|
aiken
Aged Yak Warrior
525 Posts |
Posted - 2003-02-04 : 13:33:38
|
I'm experiencing some performance problems on a production database, and in the process of troubleshooting, I've noticed that the quick way to count rows in a table is broken as well. When I do a SELECT rows FROM sysindexes WHERE id = OBJECT_ID('any_table') AND indid < 2 , it just hangs. I can set the DB timeout to 5 minutes, and that query will still be sitting there. This is true for any table in the database, from frequently-accessed tables with several indexes to tiny tables with only a primary key.Has anyone seen this? Any ideas? Help!Thanks-b |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-02-04 : 15:49:50
|
| do select * from master..sysprocesses - lock for any blocking processes and find out what they are doing.dbcc inputbuffer(spid)will give the last command on that spid.Alternatively there is sp_nrlocks on www.nigelrivett.com which will give all the commands and sysprocesses info for all active spids on the system.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|