Getting To Know Your Indexes

Slides:



Advertisements
Similar presentations
Big Data Working with Terabytes in SQL Server Andrew Novick
Advertisements

Automating SQL Buildouts With Hyper-V and SQL Server 2008 R2 Robert L Davis, Sr. DBA, Microsoft Corp.
The Dirty Dozen: PowerShell Scripts for the Busy DBA DBA-237 Aaron
Gather SQL Server Performance Data with PowerShell
Managing a “0 Downtime” Shop Session Code Session Title About Me 15 years as a DBA (Wells Fargo, Anthem, Yellow Pages, Pulte…) SQL.
Introduction Paul Turley SqlServerBiBlog.com Mentor, SQL Server MVP
Denny Cherry twitter.com/mrdenny.
SQL Azure Administration and Application Self-Servicing Michal Lesiczka Program Manager Microsoft Corporation Vinod Jagannathan Program Manager Microsoft.
Module 8 Improving Performance through Nonclustered Indexes.
Table Indexing for the.NET Developer Denny Cherry twitter.com/mrdenny.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
Effective Indexes For Beginners. Performance is slow Let’s add another index!
Denny Cherry twitter.com/mrdenny.
Enterprise Database Administration & Deployment SIG ▪ 313M ▪ Sept 29, 2005 ▪ 10:15 AM SQL Server 2005 Performance Diagnosis and Tuning using SQL Tools.
SQL SERVER DAYS 2011 Table Indexing for the.NET Developer Denny Cherry twitter.com/mrdenny.
October 11-14, Seattle, WA Top 10 Ways To Break Your Deployments Or: How to Avoid Your Sorry Fate Dev Nambi Senior Software Engineer Microsoft.
Analysing Indexes SQLBits 6 th October 2007 © Colin Leversuch-Roberts Kelem Consulting Limited September 2007.
Session 1 Module 1: Introduction to Data Integrity
Execution Plans Detail From Zero to Hero İsmail Adar.
Indexing Your Data Warehouse Troy Gallant, MTA. Agenda  A little about me  Indexing review  Enterprise Data Warehouse (EDW) vs. OLTP  EDW structure.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Introduction to Partitioning in SQL Server
Chris Index Feng Shui Chris
Understanding Data Storage
How Good Is Your Indexing Strategy?
Indexes By Adrienne Watt.
Adam Koehler Index Speed Demons - How To Turbo-Charge Your Text Based Queries Using Full-Text Indexing.
SQL Server Query and Index Tuning
T-SQL: Simple Changes That Go a Long Way
Parameter Sniffing in SQL Server Stored Procedures
Module 4: Creating and Tuning Indexes
Searching Business Data with MOSS 2007 Enterprise Search
Introduction to SQL Server Management for the Non-DBA
Visual Studio 2010 Database Projects
Exploring Your SQL Server Databases with T-SQL
Free Microsoft Exam Demo Questions Answers
Auditing in SQL Server 2008 DBA-364-M
Searching Business Data with MOSS 2007 Enterprise Search
Performance Monitoring Using Extended Events, DMVs & Query Store
Introducing the SQL Server 2016 Query Store
Introducing the SQL Server 2016 Query Store
The Ins and Outs of Indexes
Marcos Freccia Stop everything! Top T-SQL tricks to a developer
Troubleshooting SQL Server Basics
The Ins and Outs of Indexes
Please support our sponsors
Table Indexing for the .NET Developer
Session #, Speaker Name Indexing Chapter 8 11/19/2018.
Introducing the SQL Server 2016 Query Store
Indexing Fundamentals
Indexes: The Basics Kathi Kellenberger.
Chapter 4 Indexes.
The Ins and Outs of Indexes
CH 4 Indexes.
Indexing for Beginners
CH 4 Indexes.
Indexing For Optimal Performance
Stretch Database - Historical data storage in SQL Server 2016
What query folding means to self-service BI projects
Clustered Columnstore Indexes (SQL Server 2014)
The Ins and Outs of Indexes
Chapter 11 Managing Databases with SQL Server 2000
Governing Your Enterprise with Policy-Based Management
Analyzing Performance Problems Using XEvents, DMVs & Query Store
SQL Server Query Design and Optimization Recommendations
Advanced Dashboard Creation with PerformancePoint Services 2010
Advanced Database Topics
Analyzing Performance Problems Using XEvents, DMVs & Query Store
The Ins and Outs of Indexes
XML? What’s this doing in my database? Adam Koehler
Presentation transcript:

Getting To Know Your Indexes Microsoft SQL Server 2005/2008

Who Am I? Jason Strate SQL Server MVP Enterprise Consultant with Digineer Working with SQL Server since 1997 jstrate@digineer.com tinyurl.com/StrateSQL twitter.com/StrateSQL

Session Agenda Session Goals Index Basics System Views Index DMVs New Information

Session Agenda Session Goals Index Basics System Views Index DMVs New Information

Session Goals Identify methods to analyze current and potential indexes Learn how to identify stress found on indexes Demonstrate methods for tuning indexes Usage patterns Maintenance weight

Last Year on an Airplane… I Had Dream… What if… “I mix all index related DMVs with its metadata into a single query?”

I Hope So This Means Something… Will we learn something new about indexes and their relationships? I Hope So

Session Agenda Session Goals Index Basics System Views Index DMVs New Information

Index Basics Storage structure (B-Tree) associated with a table or view built from one or more columns (key values). The purpose of which is to improved data retrieval.

Index Basics Types Clustered – data rows stored with key values Non-Clustered – key values stored with pointer to data row Heap – unordered structure Vary with properties of Filtered, Included, Unique Out-of-scope: Full-Text, Spatial, XML

Session Agenda Session Goals Index Basics System Views Index DMVs New Information

Check Out The Indexes Methodology: Heaps or Clustered? Identical Indexes Overlapping Indexes Objects sys.indexes sys.index_columns sys.dm_db_partition_stats Unique, primary key,

Foreign Keys? Methodology Index your foreign key columns. Objects: sys.foreign_keys sys.foreign_key_columns

System Views DEMO

Session Agenda Session Goals Index Basics System Views Index DMVs New Information

Captain Obvious Methodology Keep the indexes that you use Objects sys.dm_db_index_usage_stats sys.dm_db_index_operational_stats

Captain Obvious, Again Methodology Build indexes that your queries will find useful Objects sys.dm_db_missing_index_details sys.dm_db_missing_index_groups sys.dm_db_missing_index_group_stats

Is It Money? Methodology Is it worth the maintenance? Objects sys.dm_db_index_operational_stats

Did I Just Say Maintenance? Methodology Tuning is better than troubleshooting Object sys.dm_db_index_physical_stats

Index DMVs DEMO

Are You Burning Disk? Methodology IO is resource intensive – are you managing it? Objects sys.dm_os_buffer_descriptors sys.allocation_units

Index DMVs DEMO

Session Agenda Session Goals Index Basics System Views Index DMVs New Information

Pull It Together Index Analysis System Views DMVs http://indexanalysis.codeplex.com/

Should I Create The Index? Scenario 2nd index on table 10th index on table 20th index on table Similarities It Depends

It Depends Should I Drop The Index? Scenario Index is hardly used. Maybe it’s used to determine your bonus What’s the risk? It Depends

Code Word: It Depends Get the information you need Table A and Table B have different needs Build a methodology around your databases Best practices are guidelines

Build A Methodology Analyze Add Monitor Remove

Remember Spend time getting to know your indexes regularly Data changes. Usage changes. So indexing needs change DMV statistics are based on maintenance and service start times

Complete the Evaluation Form & Win! You could win a Dell Mini Netbook – every day – just for handing in your completed form! Each session form is another chance to win! Pick up your Evaluation Form: Within each presentation room At the PASS Booth near registration area Drop off your completed Form: Near the exit of each presentation room Sponsored by Dell

for attending this session and the 2009 PASS Summit in Seattle Thank you for attending this session and the 2009 PASS Summit in Seattle