SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
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!

Weitere ähnliche Inhalte

Ähnlich wie Änderungen im Cardinality Estimator SQL Server 2014

SQL Server Lecture 1
SQL Server Lecture 1SQL Server Lecture 1
SQL Server Lecture 1
Hazem Torab
 
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
Chef Software, Inc.
 

Ähnlich wie Ä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
 

Mehr von NETUserGroupBern

Mehr von 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
 

Kürzlich hochgeladen

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 

Kürzlich hochgeladen (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
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
 
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-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Ä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!