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 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
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
Forwarded Records and Performance

Forwarded Records and Performance – SQL in Sixty Seconds #155

February 15, 2021
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Heap, SQL in Sixty Seconds, SQL Scripts, SQL Server

Forwarded records make SQL Server read extra pages when it scans a heap. In this SQL in Sixty Seconds video, I explain forwarded records and performance.

Read More
A missing courtyard stepping stone leads through a red-ribboned side path to the relocated slab.

SQL SERVER – Finding Fragmentation in Forwarded Records

February 9, 2021
Pinal Dave
SQL Performance
SQL Data Storage, SQL Heap, SQL Scripts, SQL Server

Finding Fragmentation in a heap also requires a separate check for forwarded records. I measure their effect before choosing maintenance.

Read More
RID Lookup

SQL SERVER – Heaps, Scans and RID Lookup

January 25, 2020
Pinal Dave
SQL Performance
Clustered Index, Execution Plan, SQL Heap, SQL Index, SQL Scripts, SQL Server

The question was do heaps are very bad and always force a table scan? Let us learn about RID Lookup, Heaps and table scan.

Read More
In a farm apple store, a hand searches a loose bin of apples beside a rack of apples laid in neat rows.

RID Lookups on Heaps vs Key Lookups on Clustered Tables

November 9, 2019
Pinal Dave
SQL Performance
Clustered Index, Execution Plan, SQL Heap, SQL Index, SQL Server

Compare RID lookups on heaps with clustered key lookups, inspect forwarded records, and test covering indexes with actual plans and reads.

Read More
Execution Plan Cost Breakdown.

SQL SERVER – Parallelism for Heap Scan

October 29, 2018
Pinal Dave
SQL Performance
Clustered Index, Parallel, SQL CPU, SQL Heap, SQL Index, SQL Scripts, SQL Server

Two DBAs asked me if their table needed a clustered index. Our conversation during a Health Check turned into a lesson on parallelism for Heap Scan.

Read More
1 2 Next
  • Books
  • Testimonials
  • Privacy Policy

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