|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:26 AM
Points: 138,
Visits: 511
|
|
1) How can I check the Fragmentation of the indexes.
2)How the scanDensity and Fragmentation are related?
Thanks
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 8:11 PM
Points: 118,
Visits: 819
|
|
In SQL Server 2005 and later version, you can use sys.dm_db_index_physical_stats to query size and fragmentation information for the data and indexes. http://msdn.microsoft.com/zh-cn/library/ms188917.aspx
In SQL Server 2000, you could use DBCC SHOWCONTIG .http://msdn.microsoft.com/en-us/library/ms175008.aspx
The main effect of fragmentation is that it slows down page read-ahead throughput during index scans. This causes slower response times.(When you query a fragmentated tables, SQL engine need scan more pages, after defragmentation, it will scan less pages which reduce I/O and memory utilization).
[li][/li]
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 1:07 PM
Points: 6,826,
Visits: 11,951
|
|
If you have found fragmentation or low scan density and you want to run a daily job to remediate it I would recommend looking into this:
http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:26 AM
Points: 138,
Visits: 511
|
|
How are the missing indexes created on the table? on our Prod server, we see a quite few number of missing indexes created.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 1:07 PM
Points: 6,826,
Visits: 11,951
|
|
Ola's solution does not do that. Honestly you do not want anything automatically creating missing indexes. If you're referring to what's in the DMV or what the Database Tuning Advisor produces as suggestions you might notice that there is a lot of leading column duplication in their suggestions. You want to analyze the suggestions, determine the weight advantage of each option and maybe even after rolling them up into one covering index, and then test your queries before implementing anything.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|