SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Cardinality Estimation in SQL Server 2014
Klaus Aschenbrenner
Microsoft Certified Master SQL Server 2008
www.SQLpassion.at
Twitter: @Aschenbrenner
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
About me
• CEO & Founder SQLpassion
• International Speaker, Blogger, Author
• SQL Server 2008 MCM
• "Pro SQL Server 2008 Service Broker"
• Twitter: @Aschenbrenner
• SQLpassion Academy
– http://www.SQLpassion.at/academy
– Free Newsletter, Training Videos
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Agenda
• Introduction to CE
• CE in SQL Server 2014
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Agenda
• Introduction to CE
• CE in SQL Server 2014
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
What is Cardinality Estimation?
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Predicates
• Filter Predicates
– WHERE
– HAVING
• Join Predicates
– JOIN Condition
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Selectivity
• Defines how many rows are returned
• A number between 0.0 and 1.0
– 0.0: High Selectivity (no records)
– 1.0: Low Selectivity (all records)
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Questions answered by CE
• Selectivity of
– Single Filter Predicates
– Multiple Filter Predicates
– Join Predicate between 2 tables
• How many distinct values do we expect
– GROUP BY
– DISTINCT
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Agenda
• Introduction to CE
• CE in SQL Server 2014
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
CE in SQL Server 2014
• No changes since SQL Server 7.0
– Changes were controlled through Trace Flags
– No Plan-Quality Regressions!
• CE in SQL Server 2014 is the 1st major change
– Should improve workloads
– But you WILL see regressions!
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Enabling the new CE
• Database Compatibility Level 120
• Trace Flags
– 2312: uses the new CE
– 9481: uses the old CE
– QUERYTRACEON at the statement level
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Demo
Enabling the new CE
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
CE Model Assumptions
• Independence
– Filter Predicates are not correlated
• Uniformity
– Values in a Histogram step are evenly distributed
• Inclusion
– Comparing to a constant yields in a match
• Containment
– If something is being searched for, it is assumed that it exists
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Improvements
• Multi-Column Predicates
– Conjunctions (AND)
– Disjunctions (OR)
• Ascending Key Column Problems
– Out of Range Estimations
• Join Algorithm Changes
• Troubleshooting through Extended Events
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Multi-Column Predicates - AND
• Conjunctions – old behavior
– Independence Assumption
– Selectivity of conjunctive predicates are multiplied
– Doesn’t reflect reality
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Multi-Column Predicates - AND
• Conjunctions – new behavior
– Predicates are sorted by their selectivity
– 4 most selective predicates are kept
– Predicates are softened by taking square roots
– Exponential back-off Algorithm
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Demo
Exploring Conjunctions
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Multi-Column Predicates - OR
• Disjunctions – old behavior
– Independence Assumption
– Individual selectivities are added, and the estimate of the conjunction
is subtracted
– Doesn’t reflect reality
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Multi-Column Predicates - OR
• Disjunctions – new behavior
– Independence Assumption
– Disjunctions are converted to Conjunctions
• “De Morgan’s Law”: http://en.wikipedia.org/wiki/De_Morgan's_laws
– Same Exponential back-off Algorithm is applied to the Conjunction
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Demo
Exploring Disjunctions
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
Summary
• Introduction to CE
• CE in SQL Server 2014
Bring	
  your	
  SQL	
  Server	
  installa3ons	
  to	
  a	
  new	
  level	
  of	
  excellence!	
   www.SQLpassion.at	
  
SQL Server Query Tuning Workshop
• 20. – 23. April 2015 in Zürich
• Inhalte
– Query Processing
– Indexing & Statistics
– Querying multiple Tables
– Temporal Data & Aggregations
– Windowing Functions
– In-Memory Technologies
• Weitere Informationen
– http://www.SQLpassion.at/academy/query-tuning-workshop
– 10% Rabatt für User Group Mitglieder!

Contenu connexe

Similaire à Änderungen im Cardinality Estimator SQL Server 2014

Sql dba 2008 r2 online training
Sql dba 2008 r2 online trainingSql dba 2008 r2 online training
Sql dba 2008 r2 online trainingsssql
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Red Gate Software
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesJohn Martin
 
Scaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL ServersScaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL Serversheraflux
 
Practical SQL Azure: Moving into the cloud
Practical SQL Azure: Moving into the cloudPractical SQL Azure: Moving into the cloud
Practical SQL Azure: Moving into the cloudTimothy Corey
 
SRV412 Deep Dive on CICD and Docker
SRV412 Deep Dive on CICD and DockerSRV412 Deep Dive on CICD and Docker
SRV412 Deep Dive on CICD and DockerAmazon Web Services
 
Building CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless ApplicationsBuilding CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless ApplicationsAmazon Web Services
 
SQL Server Lecture 1
SQL Server Lecture 1SQL Server Lecture 1
SQL Server Lecture 1Hazem Torab
 
Building a CI/CD Pipeline For Container Deployment to Amazon ECS
Building a CI/CD Pipeline For Container Deployment to Amazon ECSBuilding a CI/CD Pipeline For Container Deployment to Amazon ECS
Building a CI/CD Pipeline For Container Deployment to Amazon ECSAmazon Web Services
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS Amazon Web Services
 
Professional sql server dba online training
Professional sql server dba online trainingProfessional sql server dba online training
Professional sql server dba online trainingsssql
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Building a CICD Pipeline for Deploying to Containers
Building a CICD Pipeline for Deploying to ContainersBuilding a CICD Pipeline for Deploying to Containers
Building a CICD Pipeline for Deploying to ContainersAmazon Web Services
 
Building A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to ContainersBuilding A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to ContainersAmazon Web Services
 
Sql 2012 Upgrade Readiness Guide
Sql 2012 Upgrade Readiness GuideSql 2012 Upgrade Readiness Guide
Sql 2012 Upgrade Readiness GuidePARIKSHIT SAVJANI
 
IberianSPC - SharePoint 2013 Upgrade
IberianSPC - SharePoint 2013 UpgradeIberianSPC - SharePoint 2013 Upgrade
IberianSPC - SharePoint 2013 UpgradeMichael Noel
 

Similaire à Änderungen im Cardinality Estimator SQL Server 2014 (20)

Intro to sql
Intro to sqlIntro to sql
Intro to sql
 
Sql dba 2008 r2 online training
Sql dba 2008 r2 online trainingSql dba 2008 r2 online training
Sql dba 2008 r2 online training
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 
Scaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL ServersScaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL Servers
 
Practical SQL Azure: Moving into the cloud
Practical SQL Azure: Moving into the cloudPractical SQL Azure: Moving into the cloud
Practical SQL Azure: Moving into the cloud
 
SQL Server 2016 BI updates
SQL Server 2016 BI updatesSQL Server 2016 BI updates
SQL Server 2016 BI updates
 
SRV412 Deep Dive on CICD and Docker
SRV412 Deep Dive on CICD and DockerSRV412 Deep Dive on CICD and Docker
SRV412 Deep Dive on CICD and Docker
 
sqlserverdb2
sqlserverdb2sqlserverdb2
sqlserverdb2
 
Building CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless ApplicationsBuilding CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless Applications
 
SQL Server Lecture 1
SQL Server Lecture 1SQL Server Lecture 1
SQL Server Lecture 1
 
Building a CI/CD Pipeline For Container Deployment to Amazon ECS
Building a CI/CD Pipeline For Container Deployment to Amazon ECSBuilding a CI/CD Pipeline For Container Deployment to Amazon ECS
Building a CI/CD Pipeline For Container Deployment to Amazon ECS
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
 
Professional sql server dba online training
Professional sql server dba online trainingProfessional sql server dba online training
Professional sql server dba online training
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Building a CICD Pipeline for Deploying to Containers
Building a CICD Pipeline for Deploying to ContainersBuilding a CICD Pipeline for Deploying to Containers
Building a CICD Pipeline for Deploying to Containers
 
Building A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to ContainersBuilding A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to Containers
 
Sql 2012 Upgrade Readiness Guide
Sql 2012 Upgrade Readiness GuideSql 2012 Upgrade Readiness Guide
Sql 2012 Upgrade Readiness Guide
 
IberianSPC - SharePoint 2013 Upgrade
IberianSPC - SharePoint 2013 UpgradeIberianSPC - SharePoint 2013 Upgrade
IberianSPC - SharePoint 2013 Upgrade
 

Plus de NETUserGroupBern

Large Language Models, Data & APIs - Integrating Generative AI Power into you...
Large Language Models, Data & APIs - Integrating Generative AI Power into you...Large Language Models, Data & APIs - Integrating Generative AI Power into you...
Large Language Models, Data & APIs - Integrating Generative AI Power into you...NETUserGroupBern
 
Securing .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsSecuring .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsNETUserGroupBern
 
Application Security in ASP.NET Core
Application Security in ASP.NET CoreApplication Security in ASP.NET Core
Application Security in ASP.NET CoreNETUserGroupBern
 
Ruby und Rails für .NET Entwickler
Ruby und Rails für .NET EntwicklerRuby und Rails für .NET Entwickler
Ruby und Rails für .NET EntwicklerNETUserGroupBern
 
What Doctors Can Teach Us on Continuous Learning
What Doctors Can Teach Us on Continuous LearningWhat Doctors Can Teach Us on Continuous Learning
What Doctors Can Teach Us on Continuous LearningNETUserGroupBern
 
Entity Framework Core - Der Umstieg auf Core
Entity Framework Core - Der Umstieg auf CoreEntity Framework Core - Der Umstieg auf Core
Entity Framework Core - Der Umstieg auf CoreNETUserGroupBern
 
Weiches Zeugs für harte Jungs und Mädels
Weiches Zeugs für harte Jungs und MädelsWeiches Zeugs für harte Jungs und Mädels
Weiches Zeugs für harte Jungs und MädelsNETUserGroupBern
 
Refactoring: Mythen & Fakten
Refactoring: Mythen & FaktenRefactoring: Mythen & Fakten
Refactoring: Mythen & FaktenNETUserGroupBern
 
Pragmatische Anforderungen
Pragmatische AnforderungenPragmatische Anforderungen
Pragmatische AnforderungenNETUserGroupBern
 
What the hell is PowerShell?
What the hell is PowerShell?What the hell is PowerShell?
What the hell is PowerShell?NETUserGroupBern
 
BDD mit Machine.Specifications (MSpec)
BDD mit Machine.Specifications (MSpec)BDD mit Machine.Specifications (MSpec)
BDD mit Machine.Specifications (MSpec)NETUserGroupBern
 
.NETworking Workshop Design Thinking
.NETworking Workshop Design Thinking.NETworking Workshop Design Thinking
.NETworking Workshop Design ThinkingNETUserGroupBern
 

Plus de NETUserGroupBern (20)

Large Language Models, Data & APIs - Integrating Generative AI Power into you...
Large Language Models, Data & APIs - Integrating Generative AI Power into you...Large Language Models, Data & APIs - Integrating Generative AI Power into you...
Large Language Models, Data & APIs - Integrating Generative AI Power into you...
 
AAD und .NET
AAD und .NETAAD und .NET
AAD und .NET
 
SHIFT LEFT WITH DEVSECOPS
SHIFT LEFT WITH DEVSECOPSSHIFT LEFT WITH DEVSECOPS
SHIFT LEFT WITH DEVSECOPS
 
Securing .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsSecuring .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applications
 
Application Security in ASP.NET Core
Application Security in ASP.NET CoreApplication Security in ASP.NET Core
Application Security in ASP.NET Core
 
Ruby und Rails für .NET Entwickler
Ruby und Rails für .NET EntwicklerRuby und Rails für .NET Entwickler
Ruby und Rails für .NET Entwickler
 
Einführung in RavenDB
Einführung in RavenDBEinführung in RavenDB
Einführung in RavenDB
 
What Doctors Can Teach Us on Continuous Learning
What Doctors Can Teach Us on Continuous LearningWhat Doctors Can Teach Us on Continuous Learning
What Doctors Can Teach Us on Continuous Learning
 
Entity Framework Core - Der Umstieg auf Core
Entity Framework Core - Der Umstieg auf CoreEntity Framework Core - Der Umstieg auf Core
Entity Framework Core - Der Umstieg auf Core
 
Weiches Zeugs für harte Jungs und Mädels
Weiches Zeugs für harte Jungs und MädelsWeiches Zeugs für harte Jungs und Mädels
Weiches Zeugs für harte Jungs und Mädels
 
Rest Fundamentals
Rest FundamentalsRest Fundamentals
Rest Fundamentals
 
Refactoring: Mythen & Fakten
Refactoring: Mythen & FaktenRefactoring: Mythen & Fakten
Refactoring: Mythen & Fakten
 
AngularJs
AngularJsAngularJs
AngularJs
 
Pragmatische Anforderungen
Pragmatische AnforderungenPragmatische Anforderungen
Pragmatische Anforderungen
 
Einführung in MongoDB
Einführung in MongoDBEinführung in MongoDB
Einführung in MongoDB
 
What the hell is PowerShell?
What the hell is PowerShell?What the hell is PowerShell?
What the hell is PowerShell?
 
Know your warm up
Know your warm upKnow your warm up
Know your warm up
 
BDD mit Machine.Specifications (MSpec)
BDD mit Machine.Specifications (MSpec)BDD mit Machine.Specifications (MSpec)
BDD mit Machine.Specifications (MSpec)
 
Versionskontrolle mit Git
Versionskontrolle mit GitVersionskontrolle mit Git
Versionskontrolle mit Git
 
.NETworking Workshop Design Thinking
.NETworking Workshop Design Thinking.NETworking Workshop Design Thinking
.NETworking Workshop Design Thinking
 

Dernier

%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 Stilfonteinmasabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
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...Shane Coughlan
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
%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 kaalfonteinmasabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 

Dernier (20)

%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
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
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...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
%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
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

Änderungen im Cardinality Estimator SQL Server 2014

  • 1. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Cardinality Estimation in SQL Server 2014 Klaus Aschenbrenner Microsoft Certified Master SQL Server 2008 www.SQLpassion.at Twitter: @Aschenbrenner
  • 2. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   About me • CEO & Founder SQLpassion • International Speaker, Blogger, Author • SQL Server 2008 MCM • "Pro SQL Server 2008 Service Broker" • Twitter: @Aschenbrenner • SQLpassion Academy – http://www.SQLpassion.at/academy – Free Newsletter, Training Videos
  • 3. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Agenda • Introduction to CE • CE in SQL Server 2014
  • 4. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Agenda • Introduction to CE • CE in SQL Server 2014
  • 5. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   What is Cardinality Estimation?
  • 6. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Predicates • Filter Predicates – WHERE – HAVING • Join Predicates – JOIN Condition
  • 7. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Selectivity • Defines how many rows are returned • A number between 0.0 and 1.0 – 0.0: High Selectivity (no records) – 1.0: Low Selectivity (all records)
  • 8. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Questions answered by CE • Selectivity of – Single Filter Predicates – Multiple Filter Predicates – Join Predicate between 2 tables • How many distinct values do we expect – GROUP BY – DISTINCT
  • 9. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Agenda • Introduction to CE • CE in SQL Server 2014
  • 10. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   CE in SQL Server 2014 • No changes since SQL Server 7.0 – Changes were controlled through Trace Flags – No Plan-Quality Regressions! • CE in SQL Server 2014 is the 1st major change – Should improve workloads – But you WILL see regressions!
  • 11. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Enabling the new CE • Database Compatibility Level 120 • Trace Flags – 2312: uses the new CE – 9481: uses the old CE – QUERYTRACEON at the statement level
  • 12. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Demo Enabling the new CE
  • 13. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   CE Model Assumptions • Independence – Filter Predicates are not correlated • Uniformity – Values in a Histogram step are evenly distributed • Inclusion – Comparing to a constant yields in a match • Containment – If something is being searched for, it is assumed that it exists
  • 14. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Improvements • Multi-Column Predicates – Conjunctions (AND) – Disjunctions (OR) • Ascending Key Column Problems – Out of Range Estimations • Join Algorithm Changes • Troubleshooting through Extended Events
  • 15. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Multi-Column Predicates - AND • Conjunctions – old behavior – Independence Assumption – Selectivity of conjunctive predicates are multiplied – Doesn’t reflect reality
  • 16. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Multi-Column Predicates - AND • Conjunctions – new behavior – Predicates are sorted by their selectivity – 4 most selective predicates are kept – Predicates are softened by taking square roots – Exponential back-off Algorithm
  • 17. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Demo Exploring Conjunctions
  • 18. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Multi-Column Predicates - OR • Disjunctions – old behavior – Independence Assumption – Individual selectivities are added, and the estimate of the conjunction is subtracted – Doesn’t reflect reality
  • 19. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Multi-Column Predicates - OR • Disjunctions – new behavior – Independence Assumption – Disjunctions are converted to Conjunctions • “De Morgan’s Law”: http://en.wikipedia.org/wiki/De_Morgan's_laws – Same Exponential back-off Algorithm is applied to the Conjunction
  • 20. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Demo Exploring Disjunctions
  • 21. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   Summary • Introduction to CE • CE in SQL Server 2014
  • 22. Bring  your  SQL  Server  installa3ons  to  a  new  level  of  excellence!   www.SQLpassion.at   SQL Server Query Tuning Workshop • 20. – 23. April 2015 in Zürich • Inhalte – Query Processing – Indexing & Statistics – Querying multiple Tables – Temporal Data & Aggregations – Windowing Functions – In-Memory Technologies • Weitere Informationen – http://www.SQLpassion.at/academy/query-tuning-workshop – 10% Rabatt für User Group Mitglieder!