This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Gouache painting of a pantry shelf of fresh jam jars with one dusty jar with a vermilion lid at the back

Oldest Statistics in SQL Server: Find the Stale Ones First

October 21, 2020
Pinal Dave
SQL Performance
SQL DMV, SQL Scripts, SQL Statistics

To find the oldest statistics in SQL Server, read the last update time and the number of changes since. This post builds a small demo, lists every statistic with its age and percent changed, and shows why a high change count on its own is not a reason to update by hand.

Read More
statistics IO

SET STATISTICS IO ON – SQL in Sixty Seconds #128

October 5, 2020
Pinal Dave
SQL Video
Execution Plan, SQL in Sixty Seconds, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Statistics

I am working with clients on helping them tune their SQL Server Performance. Let us learn how we can use SET STATISTICS IO to check the query’s performance.

Read More
Gouache painting of a weathervane on a barn roof with a vermilion arrowhead and wheat stalks in front

Statistics That Never Auto Update: Find the NORECOMPUTE Flag

August 4, 2020
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Scripts, SQL Statistics

Statistics that never auto update usually carry a hidden NORECOMPUTE flag, set when an index was created. This post builds a demo table, shows the flagged statistic go stale while its neighbor updates itself, and lists every flagged statistic in a database. It also shows which maintenance commands clear the flag and which keep it.

Read More
Gouache painting of a bicycle wheel on a repair stand with a vermilion fork and a tool tray beside it

Column Statistics in SSMS: Update One With the Dialog

July 24, 2020
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Statistics

You can update column statistics in SSMS from the Properties window of a statistic, but a dialog gives no proof that anything happened. This post lists the steps, then uses T-SQL to prove the update with the modification counter and the sample size. It also shows why a full scan needs a statement of its own.

Read More
Gouache painting of a crowd of spinning wind-up toys on a shelf with one vermilion top

Background Job Queue: List Active Jobs and Kill a Stats Job

July 15, 2020
Pinal Dave
SQL Performance
SQL DMV, SQL Scripts, SQL Statistics, System Object

The background job queue holds work that SQL Server runs outside your queries, such as asynchronous statistics updates. This post lists the active jobs, reads the queue counters, catches a real statistics job in a demo and kills it with KILL STATS JOB. It also corrects a common mix-up: the command takes the job ID, not the session ID.

Read More
Gouache painting of a row of vases with fresh flowers and one vase of dried flowers tied with a vermilion ribbon

WITH NORECOMPUTE: Stop Auto Updates on One Table

June 25, 2020
Pinal Dave
SQL Performance
SQL Scripts, SQL Server Configuration, SQL Statistics

WITH NORECOMPUTE tells SQL Server to stop updating the statistics of one table automatically. This post sets it with UPDATE STATISTICS, proves that the modification counter keeps growing while nothing refreshes, and shows how to turn it off again. It also shows a safer option for the same problem, a persisted sample percent.

Read More
rowssampled

SQL SERVER – Rows Sampled – sys.dm_db_stats_properties

June 2, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, SQL Server DBCC, SQL Statistics

Here is the question asked in my yesterday’s Comprehensive Database Performance Health Check about rows sampled from sys.dm_db_stats_properties.

Read More
Previous 1 2 3 4 5 6 7 … 16 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com