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
A narrow bridge directs the route across a small stream

How to Know If Index is Forced on Query? – Interview Question of the Week #246

October 13, 2019
Pinal Dave
SQL Interview Questions and Answers
Query Hint, SQL Index, SQL Performance, SQL Scripts, SQL Server

Question: How to Know If Index is Forced on Query?

Answer: Let me tell you a brief story so you understand the context of the question.

Read More
One scythe in a mostly uncut hayfield while three more scythes hang idle on the barn wall.

NonParallelPlanReason: Why a Query Refuses to Go Parallel

September 14, 2019
Pinal Dave
SQL Performance
Execution Plan, MAXDOP, Parallel, SQL Performance

Read NonParallelPlanReason in actual and cached plans, then check MAXDOP, scalar functions, table variables, and query cost.

Read More
Gouache painting of a small wooden toy train with a vermilion engine on a very long winding track across a tabletop

Long-Running Query for Demonstrations You Can Control

September 6, 2019
Pinal Dave
SQL Tips and Tricks
SQL Performance, SQL Scripts, SQL Training

A long-running query for demonstrations has to run long enough to watch and stop when you say. This post builds one from a counting table, shows how its run time grows with the row count and explains how to watch and stop it. It also compares it with WAITFOR DELAY.

Read More
Gouache painting of three garden beds in a row with a hoe whose grip is vermilion

Delete the Wrong Row: A Cheap Answer That Passes the Test

August 8, 2019
Pinal Dave
SQL Puzzle
SQL Delete, SQL Performance, SQL Scripts

A cheap answer to the multiple table delete puzzle reads only 6 pages and passes the check. It can still delete the wrong row. This post shows the answer, asks you to find the row it removes by mistake, and fixes it with a delete that costs 5 reads.

Read More
A giant pumpkin filling half a harvest table, small squashes set apart in their own basket.

Filtered Statistics: Fixing Estimates for Skewed Data

July 31, 2019
Pinal Dave
SQL Performance
SQL Performance, SQL Server, SQL Statistics

Use filtered statistics to describe skewed customer values, inspect histograms, and test estimates under literal and parameterized queries.

Read More
Gouache painting of three potted plants on a stepped stand with a vermilion rosette on the tallest

Fewest Logical Reads: The Answer to the Delete Qualified Rows Puzzle

July 29, 2019
Pinal Dave
SQL Puzzle
SQL Delete, SQL Performance, SQL Scripts

The fewest logical reads for the multiple table delete puzzle come from reading each table as few times as the rules allow. A string of student IDs gets to 4 reads. A set based delete needs 5 and is the one to use. The starting script needed 19.

Read More
Gouache painting of a wall of cubbyholes each holding one boot and a vermilion boot waiting at an occupied cubby

Unique Index Performance: What a UNIQUE Index Saves

July 24, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Index, SQL Performance, SQL Scripts

Unique index performance gains come from what the optimizer learns, not from smaller pages. A tested demo compares pages, reads, plans and CPU for a plain index and a unique index. It also shows the error a duplicate causes.

Read More
Previous 1 … 16 17 18 19 20 21 22 … 50 Next
  • Books
  • Testimonials
  • Privacy Policy

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