SlideShare a Scribd company logo
How Do Non-Clustered
Indexes Improve Performance?
Introduction
Jason
Strate

e: jstrate@pragmaticworks.com
e: jasonstrate@gmail.com
b: www.jasonstrate.com

t: StrateSQL

Resources

jasonstrate.com/go/indexing

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
About Pragmatic Works

•
•
•
•
•
•
•

Industry leaders in Microsoft BI and SQL Server
Platform
SQL Server Professionals - PASS Board of Directors,
Speakers, Authors and MVP’s
National Sales Team Divided by Microsoft
Territories
National System Integrator (NSI)
Gold Certified in Business Intelligence and Data
Platform
Platform Modernization/Safe Passage
Premier Partner for PDW SI Partner Program
MS PDW Partner of Year FY13
Frontline Partnership Partner of the Year for Big Data
Executive sponsor - Andy Mouacdie, WW sales director
PDW

•
•

Over 7,200 customers worldwide
Over 186,000 people in PW database for demand
generation
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Indexes
The “One” Path
Other Paths…
How Do Non-Clustered Indexes Improve Performance?
Agenda

Introduction

Just The
Cluster

Non-Clustered
Index Patterns
MAKING BUSINESS INTELLIGENT

Value of NonClustered

Summary
www.pragmaticworks.com
Introduction

Just The
Cluster

Value of
NonClustered

NonClustered
Index
Patterns

Summary

CLUSTERED INDEX OR HEAP

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Introduction

Just The
Cluster

Value of
NonClustered

NonClustered
Index
Patterns

Summary

JUST THE CLUSTER

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Clustered
• Default data storage
• Sorted data storage
– One or more columns
– Data and index stored
together

• Fragmentation
• Operations
– Clustered index scan
– Clustered index seek
– Key Lookup
The Clustered Index Problem

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
The Clustered Index Problem

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
What About Non-Key Columns?

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
What About Non-Key Columns?

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
What About Non-Key Columns?

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Demo

CLUSTERED INDEX PROBLEM

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Left searching for answers…
Got Problems?
• Locks
– Lock Escalation
– Blocking
– Deadlocking

• Resource
– CPU
– Memory
– Storage
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Introduction

Just The
Cluster

Value of
NonClustered

NonClustered
Index
Patterns

Summary

VALUE OF NON-CLUSTERED

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
• Sorted key values
–One or more columns
–Key values only
–Pointers to Heap/Clustered
Index rows

• Secondary data access
– Bridge to the data

• Operations
– Index scan
– Index seek
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Additional Index Magic
• Included Columns
– Add data pages to index
– Bring in the data pages!

• Filtered Indexes
– Reduce the index pages

• Data Compression
– Row/Page
– Reduce the index pages
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
The Non-Clustered

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
What About Non-Key Columns?

SELECT ProductID, OrderQty
FROM Sales.SalesOrderheader
WHERE ProductID = 776
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
What About Non-Key Columns?

SELECT ProductID, OrderQty
FROM Sales.SalesOrderheader
WHERE ProductID = 716
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
What About Non-Key Columns?

SELECT ProductID, OrderQty
FROM Sales.SalesOrderheader
WHERE ProductID = 762
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Introduction

Just The
Cluster

Value of
NonClustered

NonClustered
Index
Patterns

Summary

NON-CLUSTERED INDEX PATTERNS

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Index Patterns
Cover
Up

Team
Up
MAKING BUSINESS INTELLIGENT

Look
Up
www.pragmaticworks.com
Non-Clustered Index Patterns
Cover
Up

Team
Up
MAKING BUSINESS INTELLIGENT

Look
Up
www.pragmaticworks.com
Non-Clustered Indexes - Cover Up

CREATE INDEX IX_Sample ON
Sales.SalesOrderheader (ProductID)

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes - Cover Up

SELECT ProductID
FROM Sales.SalesOrderheader
WHERE ProductID = 776
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes - Cover Up

SELECT ProductID
FROM Sales.SalesOrderheader

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes - Cover Up

CREATE INDEX IX_Sample ON
Sales.SalesOrderheader (ProductID
,OrderQty)
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes - Cover Up

SELECT ProductID, OrderQty
FROM Sales.SalesOrderheader
WHERE ProductID = 716
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes - Cover Up

SELECT ProductID, OrderQty
FROM Sales.SalesOrderheader

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Index Patterns
Cover
Up

Team
Up
MAKING BUSINESS INTELLIGENT

Look
Up
www.pragmaticworks.com
Non-Clustered Indexes – Look Up

CREATE INDEX IX_Sample ON
Sales.SalesOrderheader (ProductID)

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes – Look Up

SELECT ProductID, CarrierTrackingNumber
FROM Sales.SalesOrderheader
WHERE ProductID = 776
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes – Look Up

SELECT ProductID, CarrierTrackingNumber
FROM Sales.SalesOrderheader
WHERE ProductID = 776
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Index Patterns
Cover
Up

Team
Up
MAKING BUSINESS INTELLIGENT

Look
Up
www.pragmaticworks.com
Non-Clustered Indexes – Team Up

CREATE INDEX IX_Sample ON
Sales.SalesOrderheader (ProductID)

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes – Team Up

CREATE INDEX IX_Sample ON
Sales.SalesOrderheader
(CarrierTrackingNumber)
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes – Team Up

SELECT ProductID, CarrierTrackingNumber
FROM Sales.SalesOrderheader
WHERE ProductID = 776
AND CarrierTrackingNumber = ‘4911-403C-98’

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Non-Clustered Indexes – Team Up

SELECT ProductID, CarrierTrackingNumber
FROM Sales.SalesOrderheader
WHERE ProductID = 776
AND CarrierTrackingNumber = ‘4911-403C-98’

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Demo

NON-CLUSTERED INDEX PATTERN

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Introduction

Just The
Cluster

Value of
NonClustered

NonClustered
Index
Patterns

Summary

SUMMARY

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Summary
1. Clustered indexes are not enough
2. Non-clustered indexes provide additional
paths
3. Learn how to leverage all of the properties
4. Performance and stability enhanced through
non-clustered indexes
5. Don’t go overboard… too much of a good
thing
MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
Learn More About Indexes

MAKING BUSINESS INTELLIGENT

www.pragmaticworks.com
For more information…
Name: Jason Strate

Email: jstrate@pragmaticworks.com
Blog: www.jasonstrate.com
Resource: jasonstrate.com/go/indexing

Products
BI products to covert to a Microsoft BI
platform and simplify development on
the platform.

Services
Speed development through training, and
rapid development services from
Pragmatic Works.

Foundation
Helping those who do not have the
means to get into information technology
achieve their dreams.

More Related Content

PDF
The Flavors of Non-Clustered Indexes
PDF
Introduction to Clustered Indexes and Heaps
PDF
Necessary Evils, Building Optimized CRUD Procedures
PDF
Webinar: Get the most out of your data with panagenda ApplicationInsights and...
PDF
SQL Saturday 86 -- Enterprise Data Mining with SQL Server
PDF
Real Developers Don't Need Unit Tests
PPTX
Introduction of sql server indexing
PPTX
Microsoft dynamics ax2012 : forms and tables methods call sequences, How To?
The Flavors of Non-Clustered Indexes
Introduction to Clustered Indexes and Heaps
Necessary Evils, Building Optimized CRUD Procedures
Webinar: Get the most out of your data with panagenda ApplicationInsights and...
SQL Saturday 86 -- Enterprise Data Mining with SQL Server
Real Developers Don't Need Unit Tests
Introduction of sql server indexing
Microsoft dynamics ax2012 : forms and tables methods call sequences, How To?

Similar to How Do Non-Clustered Indexes Improve Performance? (20)

PDF
Introduction to Columnstore Indexes
PDF
Choosing Your Clustered Index
PDF
Visualization As A Solution
PDF
Partner Enablement: Key Differentiators of Denodo Platform 6.0 for the Field
PPTX
Extreme Analytics @ eBay
PPTX
Extreme Analytics @ eBay
PDF
Out of Many, One: Building a Semantic Layer to Tear Down Knowledge Silos
PPTX
Ecommerce dev for business needs
PDF
5 ways to improve performance through indexing
PDF
Columnstore improvements in SQL Server 2016
PPTX
Fried toronto sps14 91 wcm intranet
PPTX
ConnectWise Reporting Tools Overview
PPTX
Faceted Navigation: (Almost) Everyone is Doing it Wrong
PDF
Prez szabolcs
PDF
Data Discovery and BI - Is there Really a Difference?
PDF
Data Warehouse approaches with Dynamics AX
PPTX
The best of SEO toturial
PDF
sd.pdf
PPTX
How to Empower Your Business Users with Oracle Data Visualization
PPTX
Google Analytics for Business Owners
Introduction to Columnstore Indexes
Choosing Your Clustered Index
Visualization As A Solution
Partner Enablement: Key Differentiators of Denodo Platform 6.0 for the Field
Extreme Analytics @ eBay
Extreme Analytics @ eBay
Out of Many, One: Building a Semantic Layer to Tear Down Knowledge Silos
Ecommerce dev for business needs
5 ways to improve performance through indexing
Columnstore improvements in SQL Server 2016
Fried toronto sps14 91 wcm intranet
ConnectWise Reporting Tools Overview
Faceted Navigation: (Almost) Everyone is Doing it Wrong
Prez szabolcs
Data Discovery and BI - Is there Really a Difference?
Data Warehouse approaches with Dynamics AX
The best of SEO toturial
sd.pdf
How to Empower Your Business Users with Oracle Data Visualization
Google Analytics for Business Owners
Ad

More from Jason Strate (16)

PPTX
Accelerating Business Intelligence Solutions with Microsoft Azure pass
PPTX
The Plan Cache Whisperer - Performance Tuning SQL Server
PDF
Strategies for SQL Server Index Analysis
PDF
Leveraging Cloud for the Modern SQL Developer
PDF
Getting Started with Windows Azure and SQL Databases
PDF
5 SQL Server Indexing Myths
PDF
BuildingSecurity Audits with Extended Events
PDF
5 Amazing Reasons DBAs Need to Love Extended Events
PPTX
The Side Effect of NOLOCK
PDF
Discovering the plan cache (sql sat175)
PDF
Introduction to SQL Server Security
PDF
What are you waiting for? (#SQLSat211)
PDF
Discovering the plan cache (#SQLSat211)
PDF
Discovering the Plan Cache (#SQLSat 206)
PDF
A Function by Any Other Name is a Function
PDF
What are you waiting for
Accelerating Business Intelligence Solutions with Microsoft Azure pass
The Plan Cache Whisperer - Performance Tuning SQL Server
Strategies for SQL Server Index Analysis
Leveraging Cloud for the Modern SQL Developer
Getting Started with Windows Azure and SQL Databases
5 SQL Server Indexing Myths
BuildingSecurity Audits with Extended Events
5 Amazing Reasons DBAs Need to Love Extended Events
The Side Effect of NOLOCK
Discovering the plan cache (sql sat175)
Introduction to SQL Server Security
What are you waiting for? (#SQLSat211)
Discovering the plan cache (#SQLSat211)
Discovering the Plan Cache (#SQLSat 206)
A Function by Any Other Name is a Function
What are you waiting for
Ad

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation_ Review paper, used for researhc scholars
Agricultural_Statistics_at_a_Glance_2022_0.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Chapter 3 Spatial Domain Image Processing.pdf
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
Review of recent advances in non-invasive hemoglobin estimation
Programs and apps: productivity, graphics, security and other tools
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

How Do Non-Clustered Indexes Improve Performance?