×

PASS DBA Virtual Group

Date/Time: Wednesday, June 24, 2020 2020 16:00 to 17:00 UTC
Location: Virtual

View Event: Think like the Cardinality Estimator

SQL Server uses a phase during query optimization, called cardinality estimation (CE). This process makes estimates bases on the statistics as to how many rows flow from one query plan iterator to the next. Knowing how CE generates these numbers will enable you to write better TSQL code and, in turn, influence the type of physical operations during query execution.

Based on that estimated rows, the query processor decides how to access an object, which physical join to use, how to sort the data. Do you know how the CE generates these numbers? What happens when you have multiple predicates, range predicates, variable values that are ‘NOT KNOWN’ to the optimizer, or you have predicate values increasing in ascending order? Do you know what will happen if your predicate is using a value that is outside of the histogram range?

In this session, I will show you how CE estimates in all these scenarios, and you will walk out better equipped to tackle those nasty, hard to solve query plans.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.


profile for SqlWorldWide on Stack Exchange, a network of free, community-driven Q&A sites

Kubernetes Learning Path

50-days from zero to
hero with Kubernetes

Download eBook

Lightning Talks! We had them the last time and they are back. We have 10 speakers lined up to cram as much content as ... possible into a 10-minute slot. Find out more at http://www.dataweekender.com and sign up.

SSMS 18.9 had a bug. Fix is out with 18.9.1
... https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15

SQLServerGeeks is conducting a Virtual Symposium on SQL Server and Azure SQL.
Learn from skilled data professionals and... gather critical knowledge on all things SQL.

http://bit.ly/ssg_vs_may_2021

#SQLServer #SQL #AzureSQL @feaselkl @EdwardPollack
@rob_rich @i619619 @dbafromthecold

Calling all SQL database administrators, this session is for you! SQL is everywhere you need it from the IoT Edge to ... your datacenter to public clouds. Learn about these options, which to choose, and why with @BobWardMS on April 28. Register: https://bit.ly/3dffR9z #AzureSQL

Load More...