Professional Documents
Culture Documents
Sponsored By:
Thank you Sponsors!
Platinum Sponsor:
Gold Sponsors:
DBA-Art.com
Twitter: @ArthurDanSQL
Presentation slides + demos
http://www.dba-art.com/setup-local-sql-server/
DBA
Intro
3 years working with SQL Server
DBA
Overview
• What makes up an execution plan?
DBA
My test environment
SQL Server 2014 - Developer
AdventureWorks 2014
DBA
Your environment matters
Hardware
SQL Settings
Min Max Memory, Cost Threshold for Parallelism
SQL version
DBA
Graphical Execution Plan
What’s that?
DBA
Other execution plan features
Flow and size of line
DBA
Where and what are they?
Graphical Execution Plans are stored as XML
Query Store?
DBA
The Plan Cache
sys.dm_exec_cached_plans (2008)
DBA
Plan cache demo
To-do:
Build plan cache
Find our specific plan
Look at operator
View actual plan’s rows vs estimated.
DBA
Graphical Execution Plan
Plan Operators
DBA
Where do the estimates come from?
DBA
Statistics General
Used for execution plan estimates
Automatically generated
One for each index
One for each column*
Parallelism as operators
DBA
Comparing a parallel query to serial query
Demo
DBA
Compute Scalar Operator
Used for mathematical expressions
Referred to as “Expr”
DBA
Compute Scalar Demo
Demo here
DBA
Implicit Conversion
Why?
DBA
Reading Implicit Conversions
Demo
DBA
Missing Index Hints
Execution plan will contain index suggestions
DBA
Missing Indexes
Demo
DBA
Tools inside SQL Server 2016
Query Store
DBA
Finally, what you can infer
Look at size of lines between operators
DBA
Questions?
You can also contact me on Twitter, @ArthurDanSQL
or my website, www.DBA-Art.com
DBA
Useful links
Finding Implicit Conversions in your Plan Cache
Free graphical plan explorer:
https://www.sentryone.com/plan-explorer/
DBA