Thursday, December 24, 2009

Query to retrieve missing indexes (suggestions) and existing indexes of a table in one resultset.

Performance of your application can change over time. This can have various reasons like:
  1. New functionality added to the product.
  2. Changes in the implementation of the product.
  3. Customer specific usage.
Because of these reasons it can happen that the current index structure is not optimal. Some new indexes are needed to create and some indexes can be dropped because they are not used. For index suggestions and index usage statitstics you can run seperate queries. However analyzing 2 different resultsets is not always easy. Download next query to combine both results sets in one resultset.

Have fun in optimizing your index structure.

No comments: