[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

DMV and Create missing indexes

Posted on 2011-02-15
3
Medium Priority
?
1,084 Views
Last Modified: 2012-05-11
Hello,

I have executed a query that use dmv for finding missing indexes.
SELECT  TOP 25
        [Total Cost]  = ROUND(avg_total_user_cost * avg_user_impact * (user_seeks + user_scans),0)
        , avg_user_impact
        , TableName = statement
        , [EqualityUsage] = equality_columns
        , [InequalityUsage] = inequality_columns
        , [Include Columns] = included_columns
FROM        sys.dm_db_missing_index_groups g
INNER JOIN    sys.dm_db_missing_index_group_stats s
       ON s.group_handle = g.index_group_handle
INNER JOIN    sys.dm_db_missing_index_details d
       ON d.index_handle = g.index_handle
ORDER BY [Total Cost] DESC;

Does I have to create the index with the columns in the equality_usage?

Thanks

bibi
0
Comment
Question by:bibi92
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 total points
ID: 34897045
Although there is nothing wrong with your query I suggest use the free Microsoft "SQL Server 2005 Performance Dashboard Reports" where you have a performance_dashboard_main report that has exactly what you need "Missing Indexes" at the database level. I use it and trust it more than just queries against SQL sys objects and it is built by Microsoft for SQL.

SQL Server 2005 Performance Dashboard Reports
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1d3a4a0d-7e0c-4730-8204-e419218c1efc
0
 
LVL 40

Expert Comment

by:lcohan
ID: 34897127
Just check out the attachment to see what info you get out of it plus you can export it to Excel(like I did), sort by any column in the heading, get the SQL stmnt to create the index - is all in there and worth to use it.


MissingIndexes.xls
0
 

Author Closing Comment

by:bibi92
ID: 34901660
Thanks bibi
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question