SlideShare a Scribd company logo
New Features in SQL That Will Change the
Way You Tune
Lance Tidwell
February 21, 2018
Agenda
Adaptive Query Processing (2017)
New Cardinality Estimator (2014)
Query Store (2016)
Automatic Plan Correction (2017)
3
1
2
4
5 Automatic Index Management
(Azure SQL Database)
Meet Quincy
“Hi, I’m Quincy the query adventuring
pug!!”
Quincy is an adventurous pug who loves to
explore queries and execution plans.
Cardinality Estimator
What is the Cardinality Estimator?
In the building of a execution plan, the
Cardinality Estimator is what estimates
the number of rows that will flow
through each operator.
Cardinality Estimator
What changed in SQL Server 2014?
• Increased Correlation Assumption for
Multiple Predicates
• Modified Ascending Key and Out-Of-Range
Value Estimation
• Join Estimate Algorithm Changes
Cardinality Estimator
What changed in SQL Server 2014?
• Increased Correlation Assumption for
Multiple Predicates
• Modified Ascending Key and Out-Of-Range
Value Estimation
• Join Estimate Algorithm Changes
Cardinality Estimator
Potential pitfall to watch out for
• Migration to SQL Server 2014
and above can cause plan
regression.
Query Store
What is the Query Store?
The query store captures a history of
queries, plans, and runtime stats. `
Query Store
What can you do with it?
• Gives insight to performance stats for various
queries and plans over time.
• Force a specific plan to be used.
• Track query regression.
• Lets you see the wait stats information on a
specific query/plan (2017).
Query Store
Potential pitfalls to watch out for
• There is overhead in having Query Store
running. (But worth it in most cases)
• It is hard to tell if a plan has been forced by
just looking at an execution plan.
• User could force a bad plan and cause
degraded performance.
Query Store
Adaptive Query Processing
What is Adaptive Query Processing?
• Interleaved execution
• Batch-mode memory grant feedback
• Batch-mode adaptive joins
Adaptive Query Processing
Interleaved execution
• A Multi-Statement Table Valued Function
(MSTVF) instead of having a fixed cardinality
estimation of 100 rows, will now have a more
accurate cardinality estimation
• A plan with a MSTVF will now materialize the
MSTVF to get the cardinality estimation and use
that number to help determine all down stream
operations.
Adaptive Query Processing
Batch-mode memory grant feedback
• The memory grant for a query execution will no
longer be a static amount that is determined
when the plan is created.
• On repeated calls of a query, the plan will now
adjust the memory grant to help avoid temp spills
of under-estimated grants, and concurrency
issues of over-estimated grants.
Adaptive Query Processing
Batch-mode adaptive joins
• Adaptive joins will choose at the time of execution
between doing a nested loop join or a hash join.
• A threshold number is created with the adaptive
join to determine if the number of row exceeds
that number a hash join will be used instead of a
nested loop
• Currently only works with columnstore indexes.
Adaptive Query Processing
Potential pitfall to watch out for
• Interleaved execution: Though cardinality of
MSTVFs may be more accurate, you could get a
worse plan.
Automatic Plan Correction
What is the Automatic Plan Correction?
• Using Query Store, whenever plan choice
regression is detected, it will automatically force
the last good plan.
• If the forced plan is found to be no better than
regressed plan, then it will be unforced.
• If the forced plan is better than the regressed
plan, the forced plan will be kept until the
underlying schema or statistics change.
Automatic Plan Correction
Potential pitfalls to watch out for
• If you have never had a good plan, you
have nothing to fall back on.
• Putting all trust in any new automation tool
is uncomfortable and risky.
• Forcing plans should be a temporary fix.
Automatic Index Management
What is Automatic Index Management?
• Only in Azure SQL Database.
• Automatically create or drop indexes that
the system determines will help
performance.
• A created index will only be retained if
performance of affected queries improve.
• A dropped index will be recreated if
queries run slower due to its absence.
Automatic Index Management
Potential pitfalls to watch out for
• Putting all trust in any new automation
tool is uncomfortable and risky.
• Black box with limited options.
Additonal Information
Joe Sack whitepaper: https://msdn.microsoft.com/en-us/library/dn673537.aspx
Cardinality Estimator
Query Store
https://www.sqlskills.com/blogs/erin/category/query-store/
https://www.scarydba.com/?s=query+store
Adaptive Query Processing
https://docs.microsoft.com/en-us/sql/relational-
databases/performance/adaptive-query-processing
Automatic Tuning
https://docs.microsoft.com/en-us/sql/relational-
databases/automatic-tuning/automatic-tuning
Bonus
Microsoft Gray System Lab Technical Report
on improving UDFs: ift.tt/2jOzglW
@Lance_LT silentdba@gmail.com

More Related Content

What's hot

Predictability: No magic required
Predictability: No magic requiredPredictability: No magic required
Predictability: No magic required
Julia Wester
 
Battery Saving
Battery SavingBattery Saving
Battery Saving
Chris Xu
 
BASD 2019 - Measuring Flow: Metrics that Matter
BASD 2019 - Measuring Flow: Metrics that MatterBASD 2019 - Measuring Flow: Metrics that Matter
BASD 2019 - Measuring Flow: Metrics that Matter
Julie Wyman
 
VSLive Orlando 2019 - When "We are down" is not good enough. SRE on Azure
VSLive Orlando 2019 - When "We are down" is not good enough. SRE on AzureVSLive Orlando 2019 - When "We are down" is not good enough. SRE on Azure
VSLive Orlando 2019 - When "We are down" is not good enough. SRE on Azure
Rene Van Osnabrugge
 
3 ways to efficiently migrate your big data to AWS cloud | LCloud
3 ways to efficiently migrate your big data to AWS cloud | LCloud3 ways to efficiently migrate your big data to AWS cloud | LCloud
3 ways to efficiently migrate your big data to AWS cloud | LCloud
LCloud
 
EuroSTAR 2013 Albert Witteveen Final
EuroSTAR 2013 Albert Witteveen FinalEuroSTAR 2013 Albert Witteveen Final
EuroSTAR 2013 Albert Witteveen Final
Albert Witteveen
 
Basic forecasting
Basic forecastingBasic forecasting
Basic forecasting
Maarten Van Oost
 
Managing scalable infrastructure based on monitoring
Managing scalable infrastructure based on monitoringManaging scalable infrastructure based on monitoring
Managing scalable infrastructure based on monitoring
Forthscale
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Eric Ries
 
Overview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practicesOverview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practices
Ashutosh Agarwal
 
AWS Forcecast: DeepAR Predictor Time-series
AWS Forcecast: DeepAR Predictor Time-series AWS Forcecast: DeepAR Predictor Time-series
AWS Forcecast: DeepAR Predictor Time-series
PolarSeven Pty Ltd
 
Real World Performance - OLTP
Real World Performance - OLTPReal World Performance - OLTP
Real World Performance - OLTP
Connor McDonald
 
With Cloud Computing, Who Needs Performance Testing?
With Cloud Computing, Who Needs Performance Testing?With Cloud Computing, Who Needs Performance Testing?
With Cloud Computing, Who Needs Performance Testing?
TEST Huddle
 
Modeling at scale in systematic trading
Modeling at scale in systematic tradingModeling at scale in systematic trading
Modeling at scale in systematic trading
SigOpt
 
Xuber Upgrade Studio Infographic
Xuber Upgrade Studio InfographicXuber Upgrade Studio Infographic
Xuber Upgrade Studio Infographic
Xuber
 
Analysis Services Best Practices From Large Deployments
Analysis Services   Best Practices From Large DeploymentsAnalysis Services   Best Practices From Large Deployments
Analysis Services Best Practices From Large Deployments
rsnarayanan
 
SRE Demystified - 11 - Release management-2
SRE Demystified - 11 - Release management-2SRE Demystified - 11 - Release management-2
SRE Demystified - 11 - Release management-2
Dr Ganesh Iyer
 
Panel Discussion Continuous Deployment in SaaS
Panel Discussion Continuous Deployment in SaaSPanel Discussion Continuous Deployment in SaaS
Panel Discussion Continuous Deployment in SaaS
Jonas Cheng
 
Keeping Your Tests Lean
Keeping Your Tests LeanKeeping Your Tests Lean
Keeping Your Tests Lean
Meaghan Lewis
 
Agile performance testing
Agile performance testingAgile performance testing
Agile performance testing
Cesario Ramos
 

What's hot (20)

Predictability: No magic required
Predictability: No magic requiredPredictability: No magic required
Predictability: No magic required
 
Battery Saving
Battery SavingBattery Saving
Battery Saving
 
BASD 2019 - Measuring Flow: Metrics that Matter
BASD 2019 - Measuring Flow: Metrics that MatterBASD 2019 - Measuring Flow: Metrics that Matter
BASD 2019 - Measuring Flow: Metrics that Matter
 
VSLive Orlando 2019 - When "We are down" is not good enough. SRE on Azure
VSLive Orlando 2019 - When "We are down" is not good enough. SRE on AzureVSLive Orlando 2019 - When "We are down" is not good enough. SRE on Azure
VSLive Orlando 2019 - When "We are down" is not good enough. SRE on Azure
 
3 ways to efficiently migrate your big data to AWS cloud | LCloud
3 ways to efficiently migrate your big data to AWS cloud | LCloud3 ways to efficiently migrate your big data to AWS cloud | LCloud
3 ways to efficiently migrate your big data to AWS cloud | LCloud
 
EuroSTAR 2013 Albert Witteveen Final
EuroSTAR 2013 Albert Witteveen FinalEuroSTAR 2013 Albert Witteveen Final
EuroSTAR 2013 Albert Witteveen Final
 
Basic forecasting
Basic forecastingBasic forecasting
Basic forecasting
 
Managing scalable infrastructure based on monitoring
Managing scalable infrastructure based on monitoringManaging scalable infrastructure based on monitoring
Managing scalable infrastructure based on monitoring
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
 
Overview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practicesOverview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practices
 
AWS Forcecast: DeepAR Predictor Time-series
AWS Forcecast: DeepAR Predictor Time-series AWS Forcecast: DeepAR Predictor Time-series
AWS Forcecast: DeepAR Predictor Time-series
 
Real World Performance - OLTP
Real World Performance - OLTPReal World Performance - OLTP
Real World Performance - OLTP
 
With Cloud Computing, Who Needs Performance Testing?
With Cloud Computing, Who Needs Performance Testing?With Cloud Computing, Who Needs Performance Testing?
With Cloud Computing, Who Needs Performance Testing?
 
Modeling at scale in systematic trading
Modeling at scale in systematic tradingModeling at scale in systematic trading
Modeling at scale in systematic trading
 
Xuber Upgrade Studio Infographic
Xuber Upgrade Studio InfographicXuber Upgrade Studio Infographic
Xuber Upgrade Studio Infographic
 
Analysis Services Best Practices From Large Deployments
Analysis Services   Best Practices From Large DeploymentsAnalysis Services   Best Practices From Large Deployments
Analysis Services Best Practices From Large Deployments
 
SRE Demystified - 11 - Release management-2
SRE Demystified - 11 - Release management-2SRE Demystified - 11 - Release management-2
SRE Demystified - 11 - Release management-2
 
Panel Discussion Continuous Deployment in SaaS
Panel Discussion Continuous Deployment in SaaSPanel Discussion Continuous Deployment in SaaS
Panel Discussion Continuous Deployment in SaaS
 
Keeping Your Tests Lean
Keeping Your Tests LeanKeeping Your Tests Lean
Keeping Your Tests Lean
 
Agile performance testing
Agile performance testingAgile performance testing
Agile performance testing
 

Similar to Geek Sync | New Features in SQL Server That Will Change the Way You Tune

SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query TuningSQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
Javier Villegas
 
Geek Sync | Intro to Query Store
Geek Sync | Intro to Query StoreGeek Sync | Intro to Query Store
Geek Sync | Intro to Query Store
IDERA Software
 
Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)
Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)
Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)
SolarWinds
 
SQL 2016 Query Store: Et si mes queries m'étaient contées...
SQL 2016 Query Store: Et si mes queries m'étaient contées...SQL 2016 Query Store: Et si mes queries m'étaient contées...
SQL 2016 Query Store: Et si mes queries m'étaient contées...
Isabelle Van Campenhoudt
 
Monitorando performance no Azure SQL Database
Monitorando performance no Azure SQL DatabaseMonitorando performance no Azure SQL Database
Monitorando performance no Azure SQL Database
Vitor Fava
 
Sql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.pptSql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.ppt
Qingsong Yao
 
Cardinality estimator en sql server 2014. qué es y cómo nos beneficia
Cardinality estimator en sql server 2014. qué es y cómo nos beneficiaCardinality estimator en sql server 2014. qué es y cómo nos beneficia
Cardinality estimator en sql server 2014. qué es y cómo nos beneficia
SpanishPASSVC
 
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
Amazon Web Services
 
Optimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptxOptimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptx
JasonTuran2
 
The Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL ServerThe Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL Server
Jason Strate
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
GR8Conf
 
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
Amazon Web Services
 
Top 5 Java Performance Metrics, Tips & Tricks
Top 5 Java Performance Metrics, Tips & TricksTop 5 Java Performance Metrics, Tips & Tricks
Top 5 Java Performance Metrics, Tips & Tricks
AppDynamics
 
Statistics
StatisticsStatistics
Statistics
Riteshkiit
 
Performance Tuning with Execution Plans
Performance Tuning with Execution PlansPerformance Tuning with Execution Plans
Performance Tuning with Execution Plans
Grant Fritchey
 
Deploying Models
Deploying ModelsDeploying Models
Deploying Models
Eng Teong Cheah
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
DataWorks Summit
 
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
QAware GmbH
 
Load distribution of analytical query workloads for database cluster architec...
Load distribution of analytical query workloads for database cluster architec...Load distribution of analytical query workloads for database cluster architec...
Load distribution of analytical query workloads for database cluster architec...
Matheesha Fernando
 
Maximizing Database Tuning in SAP SQL Anywhere
Maximizing Database Tuning in SAP SQL AnywhereMaximizing Database Tuning in SAP SQL Anywhere
Maximizing Database Tuning in SAP SQL Anywhere
SAP Technology
 

Similar to Geek Sync | New Features in SQL Server That Will Change the Way You Tune (20)

SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query TuningSQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
 
Geek Sync | Intro to Query Store
Geek Sync | Intro to Query StoreGeek Sync | Intro to Query Store
Geek Sync | Intro to Query Store
 
Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)
Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)
Getting the most out of your Oracle 12.2 Optimizer (i.e. The Brain)
 
SQL 2016 Query Store: Et si mes queries m'étaient contées...
SQL 2016 Query Store: Et si mes queries m'étaient contées...SQL 2016 Query Store: Et si mes queries m'étaient contées...
SQL 2016 Query Store: Et si mes queries m'étaient contées...
 
Monitorando performance no Azure SQL Database
Monitorando performance no Azure SQL DatabaseMonitorando performance no Azure SQL Database
Monitorando performance no Azure SQL Database
 
Sql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.pptSql azure cluster dashboard public.ppt
Sql azure cluster dashboard public.ppt
 
Cardinality estimator en sql server 2014. qué es y cómo nos beneficia
Cardinality estimator en sql server 2014. qué es y cómo nos beneficiaCardinality estimator en sql server 2014. qué es y cómo nos beneficia
Cardinality estimator en sql server 2014. qué es y cómo nos beneficia
 
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
 
Optimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptxOptimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptx
 
The Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL ServerThe Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL Server
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
 
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
 
Top 5 Java Performance Metrics, Tips & Tricks
Top 5 Java Performance Metrics, Tips & TricksTop 5 Java Performance Metrics, Tips & Tricks
Top 5 Java Performance Metrics, Tips & Tricks
 
Statistics
StatisticsStatistics
Statistics
 
Performance Tuning with Execution Plans
Performance Tuning with Execution PlansPerformance Tuning with Execution Plans
Performance Tuning with Execution Plans
 
Deploying Models
Deploying ModelsDeploying Models
Deploying Models
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
 
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
 
Load distribution of analytical query workloads for database cluster architec...
Load distribution of analytical query workloads for database cluster architec...Load distribution of analytical query workloads for database cluster architec...
Load distribution of analytical query workloads for database cluster architec...
 
Maximizing Database Tuning in SAP SQL Anywhere
Maximizing Database Tuning in SAP SQL AnywhereMaximizing Database Tuning in SAP SQL Anywhere
Maximizing Database Tuning in SAP SQL Anywhere
 

More from IDERA Software

The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...
IDERA Software
 
Problems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloudProblems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloud
IDERA Software
 
Public cloud uses and limitations
Public cloud uses and limitationsPublic cloud uses and limitations
Public cloud uses and limitations
IDERA Software
 
Optimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptxOptimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptx
IDERA Software
 
Monitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL ServerMonitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL Server
IDERA Software
 
Database administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databasesDatabase administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databases
IDERA Software
 
Six tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costsSix tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costs
IDERA Software
 
Idera live 2021: The Power of Abstraction by Steve Hoberman
Idera live 2021:  The Power of Abstraction by Steve HobermanIdera live 2021:  The Power of Abstraction by Steve Hoberman
Idera live 2021: The Power of Abstraction by Steve Hoberman
IDERA Software
 
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
Idera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian FlugIdera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian Flug
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
IDERA Software
 
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
IDERA Software
 
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021:  Managing Digital Transformation on a Budget by Bert ScalzoIdera live 2021:  Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
IDERA Software
 
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
IDERA Software
 
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
IDERA Software
 
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
IDERA Software
 
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021:  Performance Tuning Azure SQL Database by Monica RathbunIdera live 2021:  Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
IDERA Software
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
IDERA Software
 
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
IDERA Software
 
Benefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERABenefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERA
IDERA Software
 
Achieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERAAchieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERA
IDERA Software
 
Benefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERABenefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERA
IDERA Software
 

More from IDERA Software (20)

The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...
 
Problems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloudProblems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloud
 
Public cloud uses and limitations
Public cloud uses and limitationsPublic cloud uses and limitations
Public cloud uses and limitations
 
Optimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptxOptimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptx
 
Monitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL ServerMonitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL Server
 
Database administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databasesDatabase administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databases
 
Six tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costsSix tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costs
 
Idera live 2021: The Power of Abstraction by Steve Hoberman
Idera live 2021:  The Power of Abstraction by Steve HobermanIdera live 2021:  The Power of Abstraction by Steve Hoberman
Idera live 2021: The Power of Abstraction by Steve Hoberman
 
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
Idera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian FlugIdera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian Flug
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
 
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
 
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021:  Managing Digital Transformation on a Budget by Bert ScalzoIdera live 2021:  Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
 
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
 
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
 
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
 
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021:  Performance Tuning Azure SQL Database by Monica RathbunIdera live 2021:  Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
 
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
 
Benefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERABenefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERA
 
Achieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERAAchieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERA
 
Benefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERABenefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERA
 

Recently uploaded

Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
kalichargn70th171
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
YAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring detailsYAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring details
NishanthaBulumulla1
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
Massimo Artizzu
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 

Recently uploaded (20)

Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
YAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring detailsYAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring details
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 

Geek Sync | New Features in SQL Server That Will Change the Way You Tune

  • 1. New Features in SQL That Will Change the Way You Tune Lance Tidwell February 21, 2018
  • 2. Agenda Adaptive Query Processing (2017) New Cardinality Estimator (2014) Query Store (2016) Automatic Plan Correction (2017) 3 1 2 4 5 Automatic Index Management (Azure SQL Database)
  • 3. Meet Quincy “Hi, I’m Quincy the query adventuring pug!!” Quincy is an adventurous pug who loves to explore queries and execution plans.
  • 4. Cardinality Estimator What is the Cardinality Estimator? In the building of a execution plan, the Cardinality Estimator is what estimates the number of rows that will flow through each operator.
  • 5. Cardinality Estimator What changed in SQL Server 2014? • Increased Correlation Assumption for Multiple Predicates • Modified Ascending Key and Out-Of-Range Value Estimation • Join Estimate Algorithm Changes
  • 6. Cardinality Estimator What changed in SQL Server 2014? • Increased Correlation Assumption for Multiple Predicates • Modified Ascending Key and Out-Of-Range Value Estimation • Join Estimate Algorithm Changes
  • 7. Cardinality Estimator Potential pitfall to watch out for • Migration to SQL Server 2014 and above can cause plan regression.
  • 8. Query Store What is the Query Store? The query store captures a history of queries, plans, and runtime stats. `
  • 9. Query Store What can you do with it? • Gives insight to performance stats for various queries and plans over time. • Force a specific plan to be used. • Track query regression. • Lets you see the wait stats information on a specific query/plan (2017).
  • 10. Query Store Potential pitfalls to watch out for • There is overhead in having Query Store running. (But worth it in most cases) • It is hard to tell if a plan has been forced by just looking at an execution plan. • User could force a bad plan and cause degraded performance.
  • 12. Adaptive Query Processing What is Adaptive Query Processing? • Interleaved execution • Batch-mode memory grant feedback • Batch-mode adaptive joins
  • 13. Adaptive Query Processing Interleaved execution • A Multi-Statement Table Valued Function (MSTVF) instead of having a fixed cardinality estimation of 100 rows, will now have a more accurate cardinality estimation • A plan with a MSTVF will now materialize the MSTVF to get the cardinality estimation and use that number to help determine all down stream operations.
  • 14. Adaptive Query Processing Batch-mode memory grant feedback • The memory grant for a query execution will no longer be a static amount that is determined when the plan is created. • On repeated calls of a query, the plan will now adjust the memory grant to help avoid temp spills of under-estimated grants, and concurrency issues of over-estimated grants.
  • 15. Adaptive Query Processing Batch-mode adaptive joins • Adaptive joins will choose at the time of execution between doing a nested loop join or a hash join. • A threshold number is created with the adaptive join to determine if the number of row exceeds that number a hash join will be used instead of a nested loop • Currently only works with columnstore indexes.
  • 16. Adaptive Query Processing Potential pitfall to watch out for • Interleaved execution: Though cardinality of MSTVFs may be more accurate, you could get a worse plan.
  • 17. Automatic Plan Correction What is the Automatic Plan Correction? • Using Query Store, whenever plan choice regression is detected, it will automatically force the last good plan. • If the forced plan is found to be no better than regressed plan, then it will be unforced. • If the forced plan is better than the regressed plan, the forced plan will be kept until the underlying schema or statistics change.
  • 18. Automatic Plan Correction Potential pitfalls to watch out for • If you have never had a good plan, you have nothing to fall back on. • Putting all trust in any new automation tool is uncomfortable and risky. • Forcing plans should be a temporary fix.
  • 19. Automatic Index Management What is Automatic Index Management? • Only in Azure SQL Database. • Automatically create or drop indexes that the system determines will help performance. • A created index will only be retained if performance of affected queries improve. • A dropped index will be recreated if queries run slower due to its absence.
  • 20. Automatic Index Management Potential pitfalls to watch out for • Putting all trust in any new automation tool is uncomfortable and risky. • Black box with limited options.
  • 21. Additonal Information Joe Sack whitepaper: https://msdn.microsoft.com/en-us/library/dn673537.aspx Cardinality Estimator Query Store https://www.sqlskills.com/blogs/erin/category/query-store/ https://www.scarydba.com/?s=query+store Adaptive Query Processing https://docs.microsoft.com/en-us/sql/relational- databases/performance/adaptive-query-processing Automatic Tuning https://docs.microsoft.com/en-us/sql/relational- databases/automatic-tuning/automatic-tuning Bonus Microsoft Gray System Lab Technical Report on improving UDFs: ift.tt/2jOzglW @Lance_LT silentdba@gmail.com