does the query optimizer know about index fragmentation

  • I'm new to a company and started going through some index usage using the system DMs (dm_db_index_usage_stats, dm_db_index_physical_stats, etc) and seeing that several of the indexes aren't being used. I've also noticed that framentation is really high for many of the same tables. So I'm wondering does the query optimizer take into account the fragmentation levels to make decisions and if I started a deframentation regiment would these indexes start being?

    thanks,

    Sean

  • To the best of my knowledge, no, the query optimizer does not take into account index fragmentation when determining the best query plan available.

    Good question. 🙂

    Here's a link to an index defrag script I wrote if you need one: http://sqlfool.com/2008/11/updated-index-defrag-script-2005-2008/[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

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