A Shot of SQLEspresso

SQL Blogs by Monica Morehouse (Rathbun)

  • Home
  • Session Downloads
  • Event Calendar
  • PASS
    • Hampton Roads SQL User Group
    • SQL Saturday
    • PASS WIT VC
  • DCAC
  • Contact Me
    • Disclaimer
  • Home
  • Session Downloads
  • Event Calendar
  • PASS
    • Hampton Roads SQL User Group
    • SQL Saturday
    • PASS WIT VC
  • DCAC
  • Contact Me
    • Disclaimer

No Widgets found in the Sidebar Alt!

  • Performance Tuning

    Importance of Statistics in SQL Server

    May 30, 2018 /

    Following up on my last post about the Cardinality Estimator let’s talk about column statistics and how they work and play a part in execution plans. The cardinality estimator relies heavily on statistics to get the answer to selectivity (the ratio of distinct values to the total number of values) questions and calculate a cost estimate. This hopefully gives us the best possible execution plans for queries.  In this post, I will show you where to find information about what your statistics contain and information regarding each of those fields. Then we will look at the impact of over and under estimations caused by stale or missing statistics (or even data…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    What is Automatic Tuning in Azure SQL Database

    August 28, 2018

    Invest in Yourself Stop Making Excuses

    October 22, 2019

    The Case for Scooby-Dooing: Solving SQL Server Mysteries Like a Pro– Scooby Dooing Episode 8

    October 8, 2025
  • Performance Tuning

    5 Ways to Examine Cardinality Metrics

    May 2, 2018 /

    In SQL Server the query optimizer uses a cardinality estimator to answer data SELECTIVITY questions like the ones below. The optimizer uses this cardinality data, which relies heavy on statistics to get the answers and calculate a cost estimate. It takes the #of Rows to Satisfy a Predicate/Total # of Input Rows. How many rows will satisfy a single filter predicate? Multiple? WHERE How many rows will satisfy a join predicate between two tables? JOIN How many distinct values do we expect from a specific column? DISTINCT GROUP BY From this estimate the optimizer is able to find an efficient execution plan that fulfills a query request. You will note that…

    Read More
    Monica Morehouse (Rathbun)

    Related Posts

    Synchronous VS Asynchronous Statistics Updates

    October 25, 2017

    Can You Hear It Now?

    January 31, 2018

    So How Did It Go?

    September 28, 2015

About Me

Monica Morehouse (Rathbun)

Microsoft MVP, Performancing Tuning Expert, Leader Hampton Roads SQL Server User Group, Read More…

Consulting

Sessions List

Favorite Tidbits

  • Reminder to Developers

Topic Categories

  • Azure
  • Back to Basics
  • Configurations
  • Data Masking
  • DevOps
  • Encryption
  • Idera Ace
  • Important Links
  • Indexes
  • Lone DBA
  • Misc
  • MVP
  • New SQL Version
  • Performance Tuning
  • Posts with Scripts
  • Problems & Solutions
  • Quick and Dirty
  • Security
  • Speaking
  • SQL Family
  • SQLSaturday
  • SSRS
  • Summit
  • Training
  • TSQL Tuesday
  • Uncategorized

Top Posts & Pages

  • Understanding Columnstore Indexes in SQL Server Part 1
    Understanding Columnstore Indexes in SQL Server Part 1
  • DMV’s for the Beginner
    DMV’s for the Beginner
  • Resizing Tempdb (When TEMPDB Wont Shrink)
    Resizing Tempdb (When TEMPDB Wont Shrink)
  • QUICK & DIRTY: Table name change for all stored procedures
    QUICK & DIRTY: Table name change for all stored procedures
  • How to get started with Always Encrypted for Beginners Part 1
    How to get started with Always Encrypted for Beginners Part 1
  • Trace Flags That Are Now Defaulted Behaviors in SQL Server
    Trace Flags That Are Now Defaulted Behaviors in SQL Server
  • What does this little check box do? Query Governor SQL Database Setting
    What does this little check box do? Query Governor SQL Database Setting
  • Hmmm... What’s This? Date Correlation Optimization in SQL Server
    Hmmm... What’s This? Date Correlation Optimization in SQL Server
  • SQL Index Creation Using DROP EXISTING= ON
    SQL Index Creation Using DROP EXISTING= ON
  • Add Azure Cache for Redis to Your Azure SQL Performance Tuning Toolbox
    Add Azure Cache for Redis to Your Azure SQL Performance Tuning Toolbox
Graceful Pro Theme by Optima Themes - 2026 ©
 

Loading Comments...