"using indexes in sql server 2008" by alexander korotkiy, part 2

6
Using indexes (Part II) Tools for designing indexes Statistics Fragmentation Indexes maintenance

Upload: andriy-krayniy

Post on 12-Jul-2015

70 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 2

Using indexes (Part II)

Tools for designing indexes Statistics Fragmentation Indexes maintenance

Page 2: "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 2

Tools for designing indexes

• SQL Profiler • Database Engine Tuning Advisor • DBCC AUTOPILOT • Performance Dashboard Reports • Dynamic Management Views

Page 3: "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 2

Statistics

Column name Description

RANGE_HI_KEY Upper bound column value for a histogram step. The column value is also called a key value.

RANGE_ROWS Estimated number of rows whose column value falls within a histogram step, excluding the upper bound.

EQ_ROWS Estimated number of rows whose column value equals the upper bound of the histogram step.

DISTINCT_RANGE_ROWS Estimated number of rows with a distinct column value within a histogram step, excluding the upper bound.

AVG_RANGE_ROWS Average number of rows with duplicate column values within a histogram step, excluding the upper bound (RANGE_ROWS / DISTINCT_RANGE_ROWS for DISTINCT_RANGE_ROWS > 0).

Page 4: "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 2

Fragmentation

Page 5: "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 2

Maintenance

• sys.dm_db_index_physical_stats

• REBUILD • REORGANIZE • DISABLE • UPDATE STATISTICS • Maintenance plans

Page 6: "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 2

about:me

http://unknowntransfer.blogspot.com [email protected] Skype: unknowntransfer

6