Today’s Agenda Passive Tuning Active Tuning Index Compression The Silent Killer Resources and Q&A
Passive Tuning with DMVs
DMV Tuning Lifecycle
Removing Indexes
Results
Why Are Writes Different?
Our Table: Items
Indexes On An “Item” Table Index #1: UPC_Code Index #2: SupplierID Index #3: Category QtyInStock Photo licensed with Creative Commons from:http://www.flickr.com/photos/revolute/1944742197/
Data In The Index
But When It Changes…
That’s Why…
Our Query
A Better Way: Includes CREATE INDEX IX_Category_Includes ON dbo.Items (Category) INCLUDE (QtyInStock)
And When It Changes…
Query Plan
Remember, Never SELECT *
Leave a Bread Crumb Trail
DMV Tuning Lifecycle
Missing Index Query
Okay – Now What?
When Do We Add Indexes?
DMV Tuning Lifecycle
Active Tuning: The Wizards
Danger! Danger!
The End Result CREATE NONCLUSTERED INDEX [_dta_index_Activity_11_1977058079__K1_K4_K7_K5_K3] ON [dbo].[Activity] ( [ServerName] ASC, [ActivityTypeID] ASC, [StatusTypeID] ASC, [StartTime] ASC, [DatabaseID] ASC )
Rename Each Index CREATE NONCLUSTERED INDEX [IX_ServerName_ActivityTypeID_StatusTypeID_StartTime_DatabaseID] ON [dbo].[Activity] ( [ServerName] ASC, [ActivityTypeID] ASC, [StatusTypeID] ASC, [StartTime] ASC, [DatabaseID] ASC ) ON [PRIMARY]
Makes Ongoing Tuning Easier
Active Tuning Summary Don’t just click apply Use smart names Look for overlaps Go passive first
How to make Microsoft SQL Server 2005 and 2008 go f more
How to make Microsoft SQL Server 2005 and 2008 go faster by querying the Dynamic Management Views (DMVs) to build new indexes and drop ones that aren't being used. less
0 comments
Post a comment