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: a still canal at dawn with four wooden barges moored in a row, each loaded with a stack of hay bales of a different height, the fourth barge still empty, and one vermilion ribbon tied to the nearest stack

percent_complete: Which Commands Show Real Progress

December 31, 2020
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL DMV, SQL Monitoring, SQL Server DBCC

percent_complete tells you how far a running command has come, but only some commands fill it in. This post times eleven commands on SQL Server 2025, shows which ones report real progress and which stay at 0, and adds a way to watch the silent ones.

Read More
Gouache painting of a row of grey-blue birds on a wire with two vermilion birds among them above a quiet village road

Parameters of sp_who2: Active, Session ID and the Login Trap

December 29, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Scripts, SQL Server

The parameters of sp_who2 are one optional value that can be a session ID, the word active or a login name. This post counts the rows each form returns, shows that the login form does not filter, and explains the errors.

Read More
Gouache painting of a muffin tin holding one seashell in each cup with one vermilion shell

Capture sp_who2 Output Into a Table With INSERT EXEC

December 17, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Scripts, SQL Server, Temp Table

To capture sp_who2 output, create a table with matching columns and fill it with INSERT EXEC. This post builds the table, captures the session list three times with a time stamp, and shows the two errors that stop the method.

Read More
Gouache painting of a leaf under an old brass magnifying glass and a new lens with a vermilion rim

DMV Version of sp_who2: A Cleaner Session List

December 16, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Performance, SQL Scripts, SQL Server

A DMV version of sp_who2 returns the same session details from documented views and leaves out the system tasks. This post builds the query, shows why the old spid above 50 filter fails, and stores the result in a temporary table.

Read More
Running

Slow Running Query – SQL in Sixty Seconds #146

December 11, 2020
Pinal Dave
SQL Video
Execution Plan, SQL DMV, SQL in Sixty Seconds

One of the most popular questions I receive during Comprehensive Database Performance Health Check is if I have a script that lists Slow Running Query.

Read More
Gouache painting of a tortoise leaving a long winding trail in the sand with a small vermilion dot nearby

Slowest Cached Queries in SQL Server: Time, Reads and Plan

December 7, 2020
Pinal Dave
SQL Performance
Execution Plan, SQL DMV, SQL Scripts

To find the slowest cached queries in SQL Server, rank each statement by its average elapsed time and keep its plan beside it. This post builds a small workload, reads sys.dm_exec_query_stats with the plan, and shows why a database filter on the sql text hides every ad hoc query.

Read More
Gouache painting: a long wooden shelf of identical round teapots, each with a plain linen string tied around its handle so they can be told apart, the first teapot left bare and one string dyed vermilion

Uniquifier: The Hidden Cost of Duplicate Clustered Keys

November 2, 2020
Pinal Dave
SQL Performance
Clustered Index, SQL Data Storage, SQL DMV, SQL Index

The uniquifier is a hidden 4-byte value that SQL Server adds to duplicate keys in a non-unique clustered index. This post measures its real cost row by row on SQL Server 2025 and shows it on the page. It also compares it with a unique key you choose yourself.

Read More
Previous 1 … 3 4 5 6 7 8 9 … 44 Next
  • Books
  • Testimonials
  • Privacy Policy

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