September 13, 2006 at 3:22 am
Hi Guys,
We've identified a table in our system as the main hotspot in the entire database. It's relatively small (1000 - 50000 rows) but is constantly recieving update and read requests, along with inserts. My question is what indexing strategy would you recommend for it?
The number of updates means that there are always processes blocked by other items further up in the queue.
It's currently on its own filegroup with plenty of room to grow and is also on it's own disk so theres no external contention to speak of. All of the read activity is done at a read-uncommited level so it's just the inserts and updates that are causing us a headache.
September 13, 2006 at 12:47 pm
I'm lately facing locking too. For one particulary table it was solved by changing the clustered index.
September 14, 2006 at 12:56 am
Can you post the table structure please, columns, constraints, current indexes. also if possible, the update statements that run.
Thanks
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 14, 2006 at 2:53 am
Thanks for the offers and suggestions, in the end i managed to get enough time to look at it myself and fixed what was up (which is what I should have done in the first place but was snowed under with other 'issues').
Basically I changed all of the stored procedures that were doing the updates to use the ROWLOCK option which effectively eliminated the blocks on the other 50 rows in the data page that were being blocked.
I also changed the fill factor in the indexes to significantly reduce the number of rows held in each data page which also helped to reduce the contention for the inserts.
Thanks again
September 14, 2006 at 9:46 pm
If you have a clustered index, change it to a non-clustered index. That'll help a highly transactional table a bit, as well, especially if you have a lot of inserts that may be "out of order".
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply