×

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

15 minutes until #TalesFromTheField! @JoshLuedeman is the host with @IrishSQL & @hope_foley !

Will @nodestreamio... win? Will @SQLBalls? Is it finally time for @neeraj_jhaveri to win?

Tune in to find out! 1pm EST.

https://www.youtube.com/channel/UC0WSqYstuCm0f9QoO1wmZIA

Tomorrow at 9 am PST, I’ll be sharing 6 categories of customers you should keep in mind as you build your ...product/program/process…+ 3 questions you should ask yourself to ensure inclusive product development.

I have 37 examples to share so get ready for a whirlwind 😹 https://twitter.com/sqlworldwide/status/1574769328251195392

Taiob Ali #MVP #Vaccinated @SqlWorldWide

"Engineering Clinical Apps for Accessibility" by @donasarkar organized by Boston Healthcare Cloud Technology Community...

https://www.meetup.com/healthcare-tech-community/events/287850519/

📆September 28th, 2022
🕛12:00 pm EST US
📌Microsoft Technology Center, Bretton Woods 1001 (room)

❓ @dcarotv

"Engineering Clinical Apps for Accessibility" by @donasarkar organized by Boston Healthcare Cloud Technology Community...

https://www.meetup.com/healthcare-tech-community/events/287850519/

📆September 28th, 2022
🕛12:00 pm EST US
📌Microsoft Technology Center, Bretton Woods 1001 (room)

❓ @dcarotv

@SqlrUs will be talking about "Exploring SQL Server Data Encryption Offerings" at #sqlsatboston

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

#sqlsaturday #database #sqlserver #encryption #MVPBuzz

@SqlServerNerd will be talking about "Availability Group Enhancements in SQL Server 2022" at #sqlsatboston

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

#sqlsaturday #database #sqlserver2022 #HADR

Load More...