Index maintenance

  • 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

  • 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).

  • 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

  • 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

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply