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 windowsill with six jars of jam and a vase of wildflowers, one jar vermilion

TRUNCATE TABLE WITH PARTITIONS: Empty One Partition Fast

July 1, 2021
Pinal Dave
SQL Performance
SQL Delete, SQL Scripts, SQL Transactions, Table Partitioning

TRUNCATE TABLE WITH PARTITIONS empties one partition and logs far less than DELETE. See the syntax, the index rule and the limits in SQL Server.

Read More
Illustrated cover: SUM(1)

SQL Server – Single Scan for 3 Operations – COUNT(*) COUNT(1) SUM(1)

June 30, 2021
Pinal Dave
SQL Performance
Execution Plan, SQL Function, SQL Index, SQL Scripts, SQL Server, SQL Server Management Studio

Today we will take the same conversation to the next level by discussing Single Scan for 3 Operations – COUNT(*) COUNT(1) SUM(1).

Read More
A row of iron cleats on a dock, all lines slack except one taut red line.

Latch Waits at the Top: Reading sys.dm_os_latch_stats

June 28, 2021
Pinal Dave
SQL Performance
DBA, SQL DMV, SQL Performance, SQL Wait Stats

Sample SQL Server latch waits by class, then connect ACCESS_METHODS_DATASET_PARENT, FGCB_ADD_REMOVE, and LOG_MANAGER to the next check.

Read More
Three tools inspect one populated source while a separate empty tray remains visible.

SQL SERVER – SUM(1) vs COUNT(*) – Performance Observation

June 25, 2021
Pinal Dave
SQL Performance
Execution Plan, SQL Scripts, SQL Server

My Performance Observation found similar counting plans for a nonempty table. SUM(1) and COUNT(*) still differ on empty input.

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
Illustrated cover: Scans Are Not Always Bad

SQL SERVER – Index Scans are Not Always Bad

June 11, 2021
Pinal Dave
SQL Performance
Execution Plan, SQL Index, SQL Scripts, SQL Server

Are Index Scans Bad? The answer No. Index Scans are Not Always Bad. This was in-depth discussed with my client during the Health Check.

Read More
Gouache painting of three grey wheelbarrows in three furrows beside a wooden crate, and a small vermilion basket at a fourth narrow furrow

Table Variables and Parallelism: Reads Yes, Inserts No

June 7, 2021
Pinal Dave
SQL Performance
Parallel, SQL Scripts, SQL Variable, Temp Table

Table variables and parallelism: reads can run in parallel, inserts cannot. See the plan reason, the 1-row estimate at old levels, and when to use a temp table.

Read More
Previous 1 … 12 13 14 15 16 17 18 … 126 Next
  • Books
  • Testimonials
  • Privacy Policy

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