×

SQL SATURDAY #961 Albany

Date/Time: Saturday, July 25, 2020 09:30 to 10:40 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 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

RT: @DCACco: https://bit.ly/3QMQ3UF Are you a speaker in the #SQLServer community? Are you going to the #sqlpass ...summit? Time is running out to register for #SpeakerIdol. If you haven't registered already, get registered ASAP. There are only a few days… https://bit.ly/3Smx9VE

Fun, educational, and full of embarrassing stories! If you can make SQL Saturday Boston, then stop by this session for... laughs, groans, and some useful ways to keep the query optimizer working for you!

#SqlSaturday #SqlSatBoston

@SqlrUs will be talking about "Saving Yourself with Accelerated Database Recovery" at #sqlsatboston

Did you register?
...https://www.eventbrite.com/e/sql-saturday-boston-2022-tickets-380639893167

#sqlsaturday #database #sqlserver #ADR #MVPBuzz

@BryanCafferky will be talking about "Python & SQL Server: A Winning Combination" at #sqlsatboston

Did you ...register?
https://www.eventbrite.com/e/sql-saturday-boston-2022-tickets-380639893167

#sqlsaturday #python #SQLServer

@JohnMiner3 will be talking about "Security your delta lake with table access controls" at #sqlsatboston

Did you ...register?
https://www.eventbrite.com/e/sql-saturday-boston-2022-tickets-380639893167

#sqlsaturday #deltalake #security #encryption #MVPBuzz

Load More...