The Query Store SQL Tuning
-
Upload
grant-fritchey -
Category
Software
-
view
665 -
download
2
Transcript of The Query Store SQL Tuning
Grant Fritchey | www.ScaryDBA.com
www.ScaryDBA.com
The Query Store and SQL Tuning
Grant Fritchey – Red Gate Software
Grant Fritchey | www.ScaryDBA.com
Goal
Understand the information and mechanisms behind the Query Store
Learn how to work with and maintain the Query Store
Discover new opportunities and mechanisms for dealing with query performance tuning issues
2
Grant Fritchey | www.ScaryDBA.com
Get in touch
scarydba.com
@gfritchey
Grant Fritchey
Grant Fritchey | www.ScaryDBA.com
Query Store
8
Plan Store
RuntimeStatistics
QueryOptimization
Process
Async
QueryExecution
Async
Grant Fritchey | www.ScaryDBA.com
You control…
11
Turn it on or Off
Time to flush to disk
Size of storage
Days in storage
Plans per query limit
Automatic cleanup
Capture Mode
Aggregation Interval Length
Grant Fritchey | www.ScaryDBA.com 12
Qu
erie
s • Execution count
•Duration
•CPU
•Compile
Exe
cuti
on
Pla
ns • Estimated
Plan
•More than one per query
Grant Fritchey | www.ScaryDBA.com
In-Memory OLTP
14
Exactly the same
Except
• Not persisted
• sys.sp_xtp_control_query_exec_stats
• Plan forcing can fail
• No memory grants
• Need to recompile to capture metrics
Grant Fritchey | www.ScaryDBA.com
Plan Forcing
15
Plan Store
RuntimeStatistics
QueryOptimization
Process
Async
QueryExecution
Async
Plan forcing
Grant Fritchey | www.ScaryDBA.com
Goal
Understand the information and mechanisms behind the Query Store
Learn how to work with and maintain the Query Store
Discover new opportunities and mechanisms for dealing with query performance tuning issues
16
Grant Fritchey | www.ScaryDBA.com
Get in touch
scarydba.com
@gfritchey
Grant Fritchey
Grant Fritchey | www.ScaryDBA.com
Photo Credits
Meteor
London
Flight data recorder
Undo button
19