Removing unused indexes according to execution plans

  • Hi all,

     

    we have a lot of indexes generated by our model, but now we want to remove those which are not used by our application.

    We want to do this by executing the query, check the execution plan and mark indexes which are not used.

    Now the problems/questions we have to solve

    1. Is there a API for a VB6-Program for getting the execution plan information? If so, has somebody an examle?

    2. Is there another way of doing the same?

     

  • This was removed by the editor as SPAM

  • I've never tried to get the execution plan outside of Query Analyzer, but I think you should look up SET SHOWPLAN_TEXT in BOL.

    Have you tried the Query Analyzer Index Analyzer tool?  If you select the proper options, it will suggest which indexes to drop.  You can have it examine one query, a batch of queries, or you can save a trace from SQL Profiler and analyze that.

  • You could run a trace through SQL Profiler. Remember this will add overhead to the server, so do not do it on production. It might be easier to break your application into modules and create a trace on each one. Then you would have verification of what is being used. You could then run it through the Index Tuning Wizard to see what it returns.

    I have had mixed results with the Tuning Wizard, so do not accept everything at face value.

    Bon chance

    Quand on parle du loup, on en voit la queue

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

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