SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Indexes on tables with a high churn rate


Indexes on tables with a high churn rate

Author
Message
alan_b
alan_b
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 55
Are there any recommendations for indexing a table with a very high churn rate?

I have a table (in an inherited DB) that is basically used for processing temporary data.

There is a service constantly running that populates this table (200,000-400,000 inserts per day).
There are a number of services running that retrieve and use the data. They flag the data as processed. (200,000-400,000 updates per day).
There is also an additional service that deletes old processed data from the table. (200,000-400,000 deletes per day).

There are indexes on the table but because of the high data churn rate, they are always completely fragmented. They are probably causing more harm than good.

So are there any recommendations for indexing on tables with such high insert, update, delete and read activity?
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)

Group: General Forum Members
Points: 97719 Visits: 33014
The most important thing I would suggest is monitoring how the statistics are maintained. Likely it's just the automatic update. Depending on the type of data, how it's stored in the indexes, etc., this may be grossly inadequate. You may need to do a full scan on your own on a regular basis.

As to the fragmentation of the indexes, unless you're running enterprise and can do an online rebuild of the indexes, I don't think you have much choice around that. Even a fragmented index can be helpful and fragmentation isn't always a big deal. Measure performance before and after a defrag to see exactly how much impact you might be suffering from.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
alan_b
alan_b
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 55
thanks for the feedback. I will try that.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search