Advanced Index Tuning for SQL Server

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Advanced Index Tuning for SQL Server - Presentation Transcript

    1. Advanced Index Tuning
    2. Brent Ozar
      SQL Server MVPfor Quest Software
      SQLServerPedia Ed.
      SQL, SAN, VM admin
      Dot-com-crash experience
      Performance freak
      Twitter @BrentO
      Blog: www.BrentOzar.com
      Photo Source http://www.flickr.com/photos/vasta/415625308/
    3. Today’s Agenda
      Passive Tuning
      Active Tuning
      Index Compression
      The Silent Killer
      Resources and Q&A
    4. Passive Tuning with DMVs
    5. DMV Tuning Lifecycle
    6. Removing Indexes
    7. Results
    8. Why Are Writes Different?
    9. Our Table: Items
    10. 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/
    11. Data In The Index
    12. But When It Changes…
    13. That’s Why…
    14. Our Query
    15. A Better Way: Includes
      CREATE INDEX
      IX_Category_Includes
      ON dbo.Items (Category)
      INCLUDE (QtyInStock)
    16. And When It Changes…
    17. Query Plan
    18. Remember, Never SELECT *
    19. Leave a Bread Crumb Trail
    20. DMV Tuning Lifecycle
    21. Missing Index Query
    22. Okay – Now What?
    23. When Do We Add Indexes?
    24. DMV Tuning Lifecycle
    25. Active Tuning: The Wizards
    26. Danger! Danger!
    27. 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
      )
    28. 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]
    29. Makes Ongoing Tuning Easier
    30. Active Tuning Summary
      Don’t just click apply
      Use smart names
      Look for overlaps
      Go passive first
    31. SQL 2008 Data Compression
    32. Estimating Compression
      sp_estimate_data_compression_savings
      @schema_name
      @object_name
      @index_id
      @partition_number
      @data_compression
    33. Index Compression Drawbacks
      Enterprise Edition only
      No inheritance
      No automation
    34. The Silent Performance Killer
    35. Pretend You’re SQL Server
      Photo Licensed with Creative Commons From http://www.flickr.com/photos/quacktaculous/3143079032/
    36. 13% to 460%Faster
    37. Absolutely No:
      App changes
      Vendor issues
      Testing required
      Guessing on indexes
      Backfires
    38. Not All Unicorns and Roses
      Standard Edition: Offline Only
      Enterprise Edition: Most Online
      Generates a lot of transaction logs
    39. The Native Solution
    40. The Better Way: T-SQL Code
    41. Don’t Reinvent The Wheel
    42. http://www.brentozar.com/go/faster
    SlideShare Zeitgeist 2009

    + Quest SoftwareQuest Software Nominate

    custom

    320 views, 0 favs, 0 embeds more stats

    How to make Microsoft SQL Server 2005 and 2008 go f more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 320
      • 320 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 13
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories