|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, October 25, 2006 11:24 PM
Points: 9,
Visits: 1
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 2:41 AM
Points: 1,129,
Visits: 685
|
|
Thanks for the sql.
However, why not going through the next step and return the index details at the same time... Something like
SELECT TOP 20 mid.statement as table_name, equality_columns, inequality_columns, included_columns , CAST(index_advantage AS INT) AS index_advantage -- cast to hint just to make it more readable FROM ( SELECT (user_seeks+user_scans) * avg_total_user_cost * (avg_user_impact * 0.01) as index_advantage , migs.group_handle FROM sys.dm_db_missing_index_group_stats migs ) as migs_adv, sys.dm_db_missing_index_groups mig, sys.dm_db_missing_index_details mid WHERE migs_adv.group_handle = mig.index_group_handle AND mig.index_handle = mid.index_handle ORDER BY index_advantage DESC
;)
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 3:07 AM
Points: 39,
Visits: 281
|
|
| I'm sorry, a bit in the dark. What does the outcome tell me?
|
|
|
|