×

PASS Data Community SUMMIT 2021

Date/Time: Wednesday, November 10, 2021 11:45 to 13:00 EST
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 based 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? If your query has only one predicate, the query optimizer will use the histogram to estimate how many rows will be qualified. 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 an amount that is outside of the histogram range?

In this session, I will show you how the cardinality estimator estimates in all of these scenarios. You will walk out of this session with a clear understanding of how the CE generates its numbers and ready 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

#sqlhelp
SqlPackage Import - How to chose vCore purchase model?

... https://dba.stackexchange.com/questions/306335/sqlpackage-import-how-to-chose-vcore-purchase-model

Have you checked out the schedule for @DataMinutes ?
There are 50 sessions to choose from https://buff.ly/3q81R9h

... Which sessions are you looking forward to?

#Azure #DataAnalytics #Data #Machinelearning #AI #MVPBuzz

@DataMozart will be talking about: "It's just a SQL - Crash course on Synapse Serverless for T-SQL ninjas! "
... Registration details:
https://www.meetup.com/dbavug/events/277522059/

Wednesday, January 26, 2022
Noon PST
2000 GMT
#azuresynapse #sqlpool #Serverless #tsql #MVPBuzz

I am speaking at the upcoming @DataMinutes on 2022-01-21. #DataMinutes is a fast-paced lightning talk event with 50 ... sessions to choose from

Check out the schedule https://datagrillen.com/dataminutes/ and sign up for the event here https://www.meetup.com/datagrillen/events/281518971/

See you there!

If you're attending #SQLBits2022 in person and & willing to help make the event even more epic by joining our band ... of orange shirted volunteers we'd love to hear from you. To sign up pls use this form https://forms.office.com/r/J6sGsPJTxG of if you want to know more email helpers@sqlbits.com

Load More...