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
brent pinal

SQL SERVER – Performance: OR vs IN – A Summary and Further Reading

September 12, 2023
Pinal Dave
SQL Performance
Clustered Index, Computed Column, SQL Index, SQL Server

The varied responses led me to write a detailed blog post to clarify the correct answer. If you missed it, you can read it here. Let us see A Summary and Further Reading.

Read More
Gouache painting of a basket with a heap of clothes beside neat folded stacks, a vermilion shirt on top

Heap or Clustered Index: When a Heap Table Is the Right Choice

June 7, 2023
Pinal Dave
SQL Performance
Clustered Index, SQL Data Storage, SQL Heap, SQL Index

The heap or clustered index choice changes the reads of every scan. The demos measure forwarded records in a heap, a range query on both kinds of table, and the size of a nonclustered index on a wide key, and says when a heap is the right choice.

Read More
Detachable collars with a single chosen stud fitted to each collar

One Default Row per Customer With a Filtered Unique Index

February 1, 2022
Pinal Dave
SQL Performance
Clustered Index, ColumnStore Index, SQL Index

Two browser tabs, two default addresses. Here is how a filtered unique index keeps the rule in the database and how to switch defaults safely.

Read More
Matching workpieces are compared around a new fitted guide and its maintenance tools.

SQL SERVER – Measure Index Performance

October 27, 2021
Pinal Dave
SQL Performance
Clustered Index, SQL Index, SQL Server, SQL Statistics

I measure index performance against the same workload before and after a change. A customer wanted to assess a new index.

Read More
Gouache painting of three bicycle wheels of different sizes on a rack, the smallest vermilion

Count Rows in a Heap: Which Scan Does SQL Server Use?

June 18, 2021
Pinal Dave
SQL Tips and Tricks
Clustered Index, Execution Plan, SQL Heap, SQL Index

Count rows in a heap and SQL Server scans every page. See the plan change with a clustered and a narrow index, and why a heap does not compact its pages.

Read More
Gouache painting of three vases in a row, the slimmest holding vermilion tulips

Index Used for COUNT(*): SQL Server Scans the Narrowest One

June 15, 2021
Pinal Dave
SQL Performance
Clustered Index, Execution Plan, SQL Index, SQL Scripts

The index used for COUNT(*) is the narrowest one that holds every row. See the pages, the scans and the reads that prove it in SQL Server.

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
Previous 1 2 3 4 5 … 8 Next
  • Books
  • Testimonials
  • Privacy Policy

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