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 football goal far across a lawn with a vermilion ball sitting much nearer

Disable Row Goal in SQL Server: When the Hint Helps and When It Hurts

December 28, 2020
Pinal Dave
SQL Performance
Execution Plan, Query Hint, SQL Scripts, SQL Server

To disable row goal for one query, add the DISABLE_OPTIMIZER_ROWGOAL hint to it. This post builds a table where the row goal chooses a bad plan, shows the reads with and without the hint, and then shows a table where the row goal wins.

Read More
Gouache painting of a wooden sieve beside a grey pail on a beach, with a heap of shells and one vermilion shell in the sieve

Number of Rows Read in an Execution Plan: What It Tells You

December 25, 2020
Pinal Dave
SQL Performance
Clustered Index, Execution Plan, SQL Index, SQL Server Management Studio

The number of rows read shows how many rows a scan or seek touched, and it can be far larger than the rows it returned. This post builds a demo table, compares a scan with two seeks, and explains why a seek can still read too many rows.

Read More
Gouache painting of a tightly packed shelf of jars above a shelf with spaced jars and one vermilion jar

Instance Level Fill Factor or Index Level: What to Set

December 23, 2020
Pinal Dave
SQL Performance
SQL Data Storage, SQL Index, SQL Server Configuration

An instance level fill factor is a default for every index that sets none, and an index level setting wins. This post reads the setting, measures what each fill factor costs in pages and saves in page splits, and gives a plan for choosing the level.

Read More
Gouache painting of a tortoise leaving a long winding trail in the sand with a small vermilion dot nearby

Slowest Cached Queries in SQL Server: Time, Reads and Plan

December 7, 2020
Pinal Dave
SQL Performance
Execution Plan, SQL DMV, SQL Scripts

To find the slowest cached queries in SQL Server, rank each statement by its average elapsed time and keep its plan beside it. This post builds a small workload, reads sys.dm_exec_query_stats with the plan, and shows why a database filter on the sql text hides every ad hoc query.

Read More
Gouache painting of a hose watering a vermilion pot beside three potted plants against a pale wall

sp_updatestats and Disabled Indexes: What Gets Updated

December 4, 2020
Pinal Dave
SQL Performance
SQL Index, SQL Scripts, SQL Statistics

sp_updatestats and disabled indexes: the procedure updates statistics on disabled nonclustered indexes and skips a table whose clustered index is disabled. This post proves both, times the cost of disabled indexes against dropped ones on a million rows, and generates a targeted update that skips them.

Read More
Gouache painting of a short train with green carriages and a dark vermilion wagon at the front running along a track at dusk

JOIN Elimination in SQL Server: When a Table Drops Out

November 25, 2020
Pinal Dave
SQL Performance
Execution Plan, SQL Joins, SQL Scripts, SQL Statistics

JOIN elimination removes a joined table from the plan when the query does not need it. This post proves it with STATISTICS IO, then tests nine variations to show when it applies and when it does not, including a foreign key that has lost its trust.

Read More
Gouache painting of a row of watered garden beds with one bed covered by a vermilion tarp

sp_autostats: See and Undo Automatic Statistics Updates

November 17, 2020
Pinal Dave
SQL Performance
SQL Scripts, SQL Server Configuration, SQL Statistics

The sp_autostats procedure shows and changes the automatic statistics update setting of one table, one index or one statistic. This post turns the setting off for a table, flips it back for one index, undoes it, and shows that the database level setting and the statistics themselves are untouched.

Read More
Previous 1 … 18 19 20 21 22 23 24 … 127 Next
  • Books
  • Testimonials
  • Privacy Policy

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