You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Missing Indexes DMV”.
You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Missing Indexes DMV”.
Thanks for this…using it right now!
my stored proecedure run 4 min off peak time and 30 mins in peak time, i am not able to find the cause for 30 mins duration.Please tell me the various ways to find the bottleneck cause solution.
we has transaction replication setup on the same server.
Hi Praful,
What sounds like is happening, is during peak time the data returned for the query is not in memory and needs to be retrieved from disk. It definitely sounds like you are missing indexes or possibly using table variables. You should get the execution plan for the query and see if there are any indexes missing.
Derek
Why do the these queries that are supposed to show indexes that the system feels are needed often contain indexes that already exist?
Hi Curt,
This is because a lot of times, the indexes are suggested in order to avoid a “bookmark lookup”. In other words, the index used to find the fields does exist, however it needs to go back to the clustered index (or heap) in order to get the required columns. The query optimizer does not like this scenario, so it will often suggest new indexes that contain “include” columns. These suggestions can be misleading. The other problem with the suggestions is that it does not take into account the fact that you may need to change your clustered index.
With all that said, the index suggestions are still very useful and something I find myself considering a lot. Much better than the suggestions in SQL 2000..
Thanks Derek!
Thanks for the script. Makes using the DMVs much faster.
[...] CPU – (Historically Medium/High) For a CPU that has historically been high, the most common issue is a lack of indexes. This is an easy fix with the new DMVs introduced in SQL Server 2005. Usually adding indexes for the top 5 offending queries will resolve this issue. Follow this to Find Missing Indexes. [...]