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 full wooden spool rack with one vermilion spool left over on the table

Maximum Columns in an Index: 32 Keys and the Way Around

March 22, 2021
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Index, SQL Scripts, SQL Statistics

The maximum columns in an index is 32 key columns, and a second limit on key size can stop an index earlier. This post builds a 40 column table, shows the error for a 33rd key column, and adds included columns to get around it. It also shows the 900 and 1,700 byte key limits and tests statistics on 33 and 40 columns.

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
An open folio remains available at the workbench beside a separate storage cabinet.

SQL SERVER – What is Logical Read?

November 12, 2020
Pinal Dave
SQL Performance
SQL Server, SQL Server Management Studio, SQL Statistics

A logical read requests a database page through the buffer cache. A customer asked about that measure after my STATISTICS IO video.

Read More
Gouache painting of a wall of wooden cubbies holding envelopes, with one vermilion envelope in one cubby

Scan Count Zero in STATISTICS IO: What the Number Means

October 28, 2020
Pinal Dave
SQL Performance
Execution Plan, SQL Scripts, SQL Statistics

Scan count zero in STATISTICS IO is not an error and not a free read. This post runs nine small queries and shows what 0, 1, 2 and 5 mean, why a unique lookup counts as zero, and why logical reads are the number to compare.

Read More
statistics time

SET STATISTICS TIME ON – SQL in Sixty Seconds 139

October 27, 2020
Pinal Dave
SQL Video
SQL DateTime, SQL in Sixty Seconds, SQL Statistics

Do you know how long your query took to execution? Well, let us learn that today in SQL in Sixty Seconds. We will discuss SET STATISTICS TIME ON.

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

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