DEFINITIONS

Definitions More Info.
Definition ID38
TitleSQL
CategorySCRIPT
Definitionmissing indexes
Definition Description-- ISMAIL ADAR
SELECT TOP 20
ROUND (s.avg_total_user_cost * s.avg_user_impact * (s.user_seeks + s.user_scans), 0) AS [Total Cost]
, d.[statement] AS [Table Name]
, equality_columns
,inequality_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

-- BENIMKI
SELECT TOP 20
d.[statement] AS [Table Name]
, equality_columns
,inequality_columns
,included_columns
,avg_user_impact
,avg_total_user_cost
,avg_system_impact
,avg_total_system_cost
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 avg_user_impact+avg_total_user_cost DESC


RecordBycunay
Record Date15-02-2012 15:08:55
Düzenle
Kopyala
Sil