SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Grant Fritchey | www.ScaryDBA.com
www.ScaryDBA.com
Getting Started Reading
Execution Plans
Grant Fritchey
grant@scarydba.com
Grant Fritchey | www.ScaryDBA.com
Goals
 Learn the best places to start at when reading an
execution plan and why you should start there.
 Take away methods for querying directly against the
execution plans that will make you faster at reading
the plans.
 Understand how to drill down on the information
within plans to arrive at a better understanding of
why the optimizer is making these query plans.
Grant Fritchey | www.ScaryDBA.com
grant@scarydba.com www.scarydba.com
@gfritchey www.linkedin.com/in/scarydba
Grant Fritchey
Product Evangelist, Red Gate Software
Grant Fritchey | www.ScaryDBA.com
Why Execution Plans?
 Best tool for #1 performance problem
» Poor code choices
» Poor structure choices
» Bad/out of date/missing statistics
 Single best window into decisions made by the
query optimizer
 Only way to know “What Happened” when you ran
a query
4
Grant Fritchey | www.ScaryDBA.com
Generating a Plan
 SQL Server Management Studio
» Estimated
» Actual
 Procedure Cache
» Estimated (sort of)
 Extended Events
» Estimated
» Actual
 Trace Events (not recommended)
» Estimated
» Actual
Grant Fritchey | www.ScaryDBA.com
Where To Start?
Grant Fritchey | www.ScaryDBA.com
Where To Start?
Grant Fritchey | www.ScaryDBA.com
First Operator
 Plan size
 Compile time
 Memory grant
 Missing Indexes
 Optimization level
 Parameter
» Compiled value
» RuntimeValue
 Query hash
 Reason for early termination
 ANSI settings
Grant Fritchey | www.ScaryDBA.com
Right to Left or Left to Right?
 A clue: English
 Another clue:These things
Grant Fritchey | www.ScaryDBA.com
Left to Right or Right to Left
 Answer: Both
 Logical processing order:
» Represents how the optimizer sees the query
» Reading it from Left to Right
 Physical processing order
» Represents the flow of data
» Follow the arrows/pipes from Right to Left
 Both are necessary to understand certain plans
Grant Fritchey | www.ScaryDBA.com
What Else to Look For
 Warnings
 Most Costly Operations
 Fat Pipes
 Extra Operations
 Scans
 Estimated vs. Actual
Grant Fritchey | www.ScaryDBA.com
Where to Look
 Tool tips
» Eh
 Properties
» Lots of Details
Grant Fritchey | www.ScaryDBA.com
DEMO
13
Grant Fritchey | www.ScaryDBA.com
Query For The Plan
 Sys.dm_exec_query_plan
 Cache dependent
SELECT deps.type_desc,
deps.last_execution_time,
deps.execution_count,
deps.total_logical_reads,
dest.encrypted AS EncryptedText,
dest.text,
deqp.query_plan,
deqp.encrypted AS EncryptedPlan
FROM sys.dm_exec_procedure_stats AS deps
CROSS APPLY sys.dm_exec_sql_text(deps.sql_handle) AS dest
CROSS APPLY sys.dm_exec_query_plan(deps.plan_handle) AS deqp
WHERE dest.text LIKE 'CREATE PROCEDURE dbo.GetSalesDetails%';
Grant Fritchey | www.ScaryDBA.com
Query the Plan
 Standard execution plans are all XML
 XML can be queried
 XQuery
WITH XMLNAMESPACES(DEFAULT
N'http://schemas.microsoft.com/sqlserver/2004/07/showplan'),
QueryPlans AS
(
SELECT RelOp.pln.value(N'@PhysicalOp', N'varchar(50)') AS
OperatorName,
RelOp.pln.value(N'@NodeId',N'integer') AS NodeId,
RelOp.pln.value(N'@EstimateCPU', N'decimal') AS CPUCost,
RelOp.pln.value(N'@EstimateIO', N'float') AS IOCost
FROM @QueryPlan.nodes(N'//RelOp') RelOp (pln)
)
Grant Fritchey | www.ScaryDBA.com
DEMO
DemoTitle
Subtitle
Grant Fritchey | www.ScaryDBA.com
References
 PerformanceTuning with SQL Server Dynamic
ManagementViews
» Louis Davidson andTim Ford
 SQL Server Execution Plans | Second Edition
 SQL Server 2012 Internals
» Kalen Delaney, Bob Beauchemin, Conor
Cunningham, Jonathan Kehayias, Paul Randal,
Benjamin Nevarez
 SQL Server 2012 Query PerformanceTuning
Grant Fritchey | www.ScaryDBA.com
Goals
 Learn the best places to start at when reading an
execution plan and why you should start there.
 Take away methods for querying directly against the
execution plans that will make you faster at reading
the plans.
 Understand how to drill down on the information
within plans to arrive at a better understanding of
why the optimizer is making these query plans.

Más contenido relacionado

Similar a Getting Started Reading Execution Plans

Troubleshooting SQL Server Performance SQL Saturday
Troubleshooting SQL Server Performance SQL SaturdayTroubleshooting SQL Server Performance SQL Saturday
Troubleshooting SQL Server Performance SQL Saturday
Stacy Gray
 
HyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalyticsHyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalytics
Jerry Jermann
 
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
Simplilearn
 

Similar a Getting Started Reading Execution Plans (20)

Data Science, Machine Learning, and H2O
Data Science, Machine Learning, and H2OData Science, Machine Learning, and H2O
Data Science, Machine Learning, and H2O
 
Portfolio
PortfolioPortfolio
Portfolio
 
Redgate Community Circle: Tools For SQL Server Performance Tuning
Redgate Community Circle: Tools For SQL Server Performance TuningRedgate Community Circle: Tools For SQL Server Performance Tuning
Redgate Community Circle: Tools For SQL Server Performance Tuning
 
The 6k startup - How to Launch a Startup on a Budget
The 6k startup - How to Launch a Startup on a BudgetThe 6k startup - How to Launch a Startup on a Budget
The 6k startup - How to Launch a Startup on a Budget
 
What is web scraping?
What is web scraping?What is web scraping?
What is web scraping?
 
Amazon interview questions
Amazon interview questionsAmazon interview questions
Amazon interview questions
 
Salesforce - Overview & Getting Started
Salesforce - Overview & Getting StartedSalesforce - Overview & Getting Started
Salesforce - Overview & Getting Started
 
Troubleshooting SQL Server Performance SQL Saturday
Troubleshooting SQL Server Performance SQL SaturdayTroubleshooting SQL Server Performance SQL Saturday
Troubleshooting SQL Server Performance SQL Saturday
 
Agile Development From A Developers Perspective
Agile Development From A Developers PerspectiveAgile Development From A Developers Perspective
Agile Development From A Developers Perspective
 
Webinar: Scaling MongoDB
Webinar: Scaling MongoDBWebinar: Scaling MongoDB
Webinar: Scaling MongoDB
 
Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011
 
Expert Big Data Tips
Expert Big Data TipsExpert Big Data Tips
Expert Big Data Tips
 
Slipstream Rapid Application Design
Slipstream Rapid Application DesignSlipstream Rapid Application Design
Slipstream Rapid Application Design
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Statistics and the Query Optimizer
Statistics and the Query OptimizerStatistics and the Query Optimizer
Statistics and the Query Optimizer
 
HyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalyticsHyperconvergedFantasyAnalytics
HyperconvergedFantasyAnalytics
 
Adversary Emulation and Red Team Exercises - EDUCAUSE
Adversary Emulation and Red Team Exercises - EDUCAUSEAdversary Emulation and Red Team Exercises - EDUCAUSE
Adversary Emulation and Red Team Exercises - EDUCAUSE
 
Query Tuning Azure SQL Databases
Query Tuning Azure SQL DatabasesQuery Tuning Azure SQL Databases
Query Tuning Azure SQL Databases
 
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
 
Enterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring BudgetEnterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring Budget
 

Más de Grant Fritchey

Más de Grant Fritchey (20)

Migrating To PostgreSQL
Migrating To PostgreSQLMigrating To PostgreSQL
Migrating To PostgreSQL
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and Alerting
 
Automating Database Deployments Using Azure DevOps
Automating Database Deployments Using Azure DevOpsAutomating Database Deployments Using Azure DevOps
Automating Database Deployments Using Azure DevOps
 
Learn To Effectively Use Extended Events_Techorama.pdf
Learn To Effectively Use Extended Events_Techorama.pdfLearn To Effectively Use Extended Events_Techorama.pdf
Learn To Effectively Use Extended Events_Techorama.pdf
 
Using Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query PerformanceUsing Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query Performance
 
You Should Be Standing Here: Learn How To Present a Session
You Should Be Standing Here: Learn How To Present a SessionYou Should Be Standing Here: Learn How To Present a Session
You Should Be Standing Here: Learn How To Present a Session
 
10 Steps To Global Data Compliance
10 Steps To Global Data Compliance10 Steps To Global Data Compliance
10 Steps To Global Data Compliance
 
Time to Use the Columnstore Index
Time to Use the Columnstore IndexTime to Use the Columnstore Index
Time to Use the Columnstore Index
 
Introduction to SQL Server in Containers
Introduction to SQL Server in ContainersIntroduction to SQL Server in Containers
Introduction to SQL Server in Containers
 
DevOps for the DBA
DevOps for the DBADevOps for the DBA
DevOps for the DBA
 
SQL Injection: How It Works, How to Stop It
SQL Injection: How It Works, How to Stop ItSQL Injection: How It Works, How to Stop It
SQL Injection: How It Works, How to Stop It
 
Privacy and Protection in the World of Database DevOps
Privacy and Protection in the World of Database DevOpsPrivacy and Protection in the World of Database DevOps
Privacy and Protection in the World of Database DevOps
 
SQL Server Tools for Query Tuning
SQL Server Tools for Query TuningSQL Server Tools for Query Tuning
SQL Server Tools for Query Tuning
 
Extending DevOps to SQL Server
Extending DevOps to SQL ServerExtending DevOps to SQL Server
Extending DevOps to SQL Server
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Introducing Azure Databases
Introducing Azure DatabasesIntroducing Azure Databases
Introducing Azure Databases
 
Statistis, Row Counts, Execution Plans and Query Tuning
Statistis, Row Counts, Execution Plans and Query TuningStatistis, Row Counts, Execution Plans and Query Tuning
Statistis, Row Counts, Execution Plans and Query Tuning
 
Understanding Your Servers, All Your Servers
Understanding Your Servers, All Your ServersUnderstanding Your Servers, All Your Servers
Understanding Your Servers, All Your Servers
 
The Query Store SQL Tuning
The Query Store SQL TuningThe Query Store SQL Tuning
The Query Store SQL Tuning
 
Performance Tuning Azure SQL Database
Performance Tuning Azure SQL DatabasePerformance Tuning Azure SQL Database
Performance Tuning Azure SQL Database
 

Último

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Getting Started Reading Execution Plans

  • 1. Grant Fritchey | www.ScaryDBA.com www.ScaryDBA.com Getting Started Reading Execution Plans Grant Fritchey grant@scarydba.com
  • 2. Grant Fritchey | www.ScaryDBA.com Goals  Learn the best places to start at when reading an execution plan and why you should start there.  Take away methods for querying directly against the execution plans that will make you faster at reading the plans.  Understand how to drill down on the information within plans to arrive at a better understanding of why the optimizer is making these query plans.
  • 3. Grant Fritchey | www.ScaryDBA.com grant@scarydba.com www.scarydba.com @gfritchey www.linkedin.com/in/scarydba Grant Fritchey Product Evangelist, Red Gate Software
  • 4. Grant Fritchey | www.ScaryDBA.com Why Execution Plans?  Best tool for #1 performance problem » Poor code choices » Poor structure choices » Bad/out of date/missing statistics  Single best window into decisions made by the query optimizer  Only way to know “What Happened” when you ran a query 4
  • 5. Grant Fritchey | www.ScaryDBA.com Generating a Plan  SQL Server Management Studio » Estimated » Actual  Procedure Cache » Estimated (sort of)  Extended Events » Estimated » Actual  Trace Events (not recommended) » Estimated » Actual
  • 6. Grant Fritchey | www.ScaryDBA.com Where To Start?
  • 7. Grant Fritchey | www.ScaryDBA.com Where To Start?
  • 8. Grant Fritchey | www.ScaryDBA.com First Operator  Plan size  Compile time  Memory grant  Missing Indexes  Optimization level  Parameter » Compiled value » RuntimeValue  Query hash  Reason for early termination  ANSI settings
  • 9. Grant Fritchey | www.ScaryDBA.com Right to Left or Left to Right?  A clue: English  Another clue:These things
  • 10. Grant Fritchey | www.ScaryDBA.com Left to Right or Right to Left  Answer: Both  Logical processing order: » Represents how the optimizer sees the query » Reading it from Left to Right  Physical processing order » Represents the flow of data » Follow the arrows/pipes from Right to Left  Both are necessary to understand certain plans
  • 11. Grant Fritchey | www.ScaryDBA.com What Else to Look For  Warnings  Most Costly Operations  Fat Pipes  Extra Operations  Scans  Estimated vs. Actual
  • 12. Grant Fritchey | www.ScaryDBA.com Where to Look  Tool tips » Eh  Properties » Lots of Details
  • 13. Grant Fritchey | www.ScaryDBA.com DEMO 13
  • 14. Grant Fritchey | www.ScaryDBA.com Query For The Plan  Sys.dm_exec_query_plan  Cache dependent SELECT deps.type_desc, deps.last_execution_time, deps.execution_count, deps.total_logical_reads, dest.encrypted AS EncryptedText, dest.text, deqp.query_plan, deqp.encrypted AS EncryptedPlan FROM sys.dm_exec_procedure_stats AS deps CROSS APPLY sys.dm_exec_sql_text(deps.sql_handle) AS dest CROSS APPLY sys.dm_exec_query_plan(deps.plan_handle) AS deqp WHERE dest.text LIKE 'CREATE PROCEDURE dbo.GetSalesDetails%';
  • 15. Grant Fritchey | www.ScaryDBA.com Query the Plan  Standard execution plans are all XML  XML can be queried  XQuery WITH XMLNAMESPACES(DEFAULT N'http://schemas.microsoft.com/sqlserver/2004/07/showplan'), QueryPlans AS ( SELECT RelOp.pln.value(N'@PhysicalOp', N'varchar(50)') AS OperatorName, RelOp.pln.value(N'@NodeId',N'integer') AS NodeId, RelOp.pln.value(N'@EstimateCPU', N'decimal') AS CPUCost, RelOp.pln.value(N'@EstimateIO', N'float') AS IOCost FROM @QueryPlan.nodes(N'//RelOp') RelOp (pln) )
  • 16. Grant Fritchey | www.ScaryDBA.com DEMO DemoTitle Subtitle
  • 17. Grant Fritchey | www.ScaryDBA.com References  PerformanceTuning with SQL Server Dynamic ManagementViews » Louis Davidson andTim Ford  SQL Server Execution Plans | Second Edition  SQL Server 2012 Internals » Kalen Delaney, Bob Beauchemin, Conor Cunningham, Jonathan Kehayias, Paul Randal, Benjamin Nevarez  SQL Server 2012 Query PerformanceTuning
  • 18. Grant Fritchey | www.ScaryDBA.com Goals  Learn the best places to start at when reading an execution plan and why you should start there.  Take away methods for querying directly against the execution plans that will make you faster at reading the plans.  Understand how to drill down on the information within plans to arrive at a better understanding of why the optimizer is making these query plans.