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 line of sandcastles that the tide never reached with a vermilion bucket beside the nearest one

Temp Tables For Destruction: Why the Counter Stays Near Zero

July 25, 2020
Pinal Dave
SQL Tips and Tricks
SQL Counter, SQL Performance, SQL Scripts, SQL TempDB

The Temp Tables For Destruction counter stays flat at zero while Temp Tables Creation Rate moves, and that confuses people. This post explains what each counter counts, reads both from T-SQL, measures a creation loop, and shows that a cached temp table in a procedure moves neither counter.

Read More
Remove Bookmark Lookup

Remove Bookmark Lookup – SQL in Sixty Seconds #089

July 22, 2020
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Index, SQL Performance, SQL Scripts, SQL Server

We fixed the query performance by removing the bookmark lookup. Let us learn about that in today’s blog post, how we can fix this issue.

Read More
Index Used

Identify Index Used for Query – SQL in Sixty Seconds #088

July 17, 2020
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Index, SQL Performance, SQL Scripts, SQL Server

How do you identify index used for query? It is a popular question in my health checks, and this SQL in Sixty Seconds video shows the easy way.

Read More
Gouache painting of a tall glass jar of rising dough with a vermilion rubber band marking where it started

Query Percentage Complete: Watch a Long Query Finish

July 13, 2020
Pinal Dave
SQL Performance
SQL DMV, SQL Performance, SQL Scripts

Query percentage complete is not a column in any view, but sys.dm_exec_query_profiles reports how many rows each operator has produced against the plan’s estimate. This post builds a monitor query for a running statement, explains why a percentage can pass 100 or even run into the thousands, and shows which operators to trust.

Read More
Gouache painting of a wheelbarrow with vermilion handles carrying a basket of fruit down an orchard row of pear trees

Multiple Aggregates in One Query: Read the Table Once

June 20, 2020
Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL Scripts

Multiple aggregates in one query read a table once, where separate subqueries read it again and again. This post measures the logical reads of two subqueries against one SELECT, uses CASE inside SUM for different filters, and shows two cases where the rewrite gains nothing or loses to an index.

Read More
Gouache painting of a wicker trunk half packed with neat folded blankets and a vermilion strap left half buckled

Kill a Running Shrink: Is It Safe to Stop DBCC SHRINKFILE?

June 4, 2020
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Performance, SQL Server DBCC

You can kill a running shrink with KILL and the database stays safe. This post starts a shrink on a test database, stops it from a second window, checks the data and the file afterwards, and shows that the shrink itself, not the kill, is what fragments the table.

Read More
A hand with sugar tongs dropping a sugar cube into each of a long row of teacups, the sugar bowl nearly empty.

Scalar Function Statistics With sys.dm_exec_function_stats

May 30, 2020
Pinal Dave
SQL Performance
SQL DMV, SQL Function, SQL Performance, SQL Server

Read dm_exec_function_stats to rank scalar UDF activity, inspect callers, verify collection settings, and recognize inlined work.

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

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