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


Index maintenance


Index maintenance

Author
Message
hai21century
hai21century
SSC Veteran
SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)

Group: General Forum Members
Points: 210 Visits: 548
Hello all,

I just started to work for a small (not so small company) in Los Angeles, their databases never have index maintenance jobs, users are complaining about the servers being so slow, the index percentages average about 25%, way below the acceptable norm. I propose to have index maintenance jobs but I have not been able to convince them that the jobs are safe (we still have SQL 2000). I explain to them that index maintenance is like oil change for cars, I told them that every thing we do has a risk and the risk is insignificant and quickly repairable. They are my IT colleagues.

Almost a month past, I insisted to have index maintenance job without avail.

What is your suggestion? Because by the end of the day, the DBA (me) is responsible for database performance.

All suggestions are appreciated.

Thank you

Hai



Jim McLeod
Jim McLeod
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1753 Visits: 1121
In this scenario, where you don't yet carry enough weight/experience to out-and-out declare that the index rebuilds are absolutely necessary, I suggest you utilise a test/dev environment. Take a recent copy of the database from production, run some performance testing on a typical workload, and then rebuild all indexes. If this then gives you solid evidence, you can convince others of the benefit.

If your database is from a 3rd party vendor, you can ask them if they have index maintenance recommendations and present that to the rest of your IT department.

As to the safety, the main thing to look out for is blocking other users, and running out of transaction log space (including any log shipping or replication or mirroring). Plus, the fact that you've run it in a test environment should help to remove fears. If you have room for a maintenance window, you can always suggest rebuilding certain indexes in a controlled method until you're sure of what the impact will be.

You might find that fragmentation is not the primary cause of the problems, but a lack of appropriate indexes, particularly if this is custom software, or your vendors also don't know much about index maintenance. Start tracing any queries that perform a large number of reads (start with 20,000 and work back from there).
hai21century
hai21century
SSC Veteran
SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)SSC Veteran (210 reputation)

Group: General Forum Members
Points: 210 Visits: 548
Hello Jim,

From your suggestion I can tell that not only you have extensive experience dealing with databases but also with people. The windows for maintenance is quite wide, from 6:00PM to 5:00AM, the largest database is only 55 GIGs, and the whole server has only 3 databases totalling 70 GIGs, quite small to today standard, we have no replication, no log shipping, no cluster, no mirroring. I ran index maintenance jobs on a test server, the only thing I did not show to them is how much performance gain after index rebuild jobs. You're are correct by saying that index is not the only cause of slowness but that is another issue I am also facing.

Thank you, Jim, for your suggestion.

Hai



TRACEY-320982
TRACEY-320982
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4882 Visits: 1014
You could run few queries with IO Stats on them and show them it takes x seconds to run without up-to-date indexes and x seconds with them.

Also explain to them if you wanted to search for an address in a phone box and never had an index at the beginning of it would it take you a long time to find it or would it be better with an index.

The problem is to convince non-technical people what it is and also why to do it. There are many DBA that will run things without knowing why so a few diagrams and statistics works wonders.

Good luck
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