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
A hearth ash rake beside settled ashes from an earlier fire

tempdb-Heavy Queries: Finding Them in Query Store

December 8, 2021
Pinal Dave
SQL Performance
Query Store, SQL Server, SQL TempDB

The tempdb spike is over before you log in. Query Store remembers who caused it, and here is how to ask.

Read More
Gouache painting of a pegboard with grey tool shapes and a screwdriver with a vermilion handle lying on the bench

Last Used Stored Procedure in SQL Server: When Did It Last Run?

October 25, 2021
Pinal Dave
SQL Tips and Tricks
Query Store, SQL Scripts, SQL Stored Procedure

To find the last used stored procedure, read last_execution_time from sys.dm_exec_procedure_stats. This post tests it on demo procedures, shows why a NULL does not mean never, and adds Query Store for a longer memory.

Read More
A hand muffling the clapper of one handbell with a leather pad in a row of brass handbells

USE HINT: Switching Off One Optimizer Rule Without Trace Flags

April 5, 2021
Pinal Dave
SQL Performance
Query Hint, Query Store, SQL Server, TraceFlags

Apply USE HINT to one query, inspect supported names, compare optimizer behavior, and manage Query Store hints with a clear removal plan.

Read More
A kitchen table tilting on a level floor because one leg still sits on old folded red card.

Auditing Query Hints Left in Production Code

March 18, 2021
Pinal Dave
SQL Performance
Execution Plan, Query Hint, Query Store, SQL Server

Start auditing query hints in modules and Query Store, rank the busiest statements, and test removal with measured plans and rollback.

Read More
A sewing machine with a half-finished seam, a hand pulling the fabric free with a loose thread still attached

Finding Queries the Application Cancelled With Attention Events

July 14, 2020
Pinal Dave
SQL Performance
Query Store, SQL Extended Events, SQL Monitoring, SQL Server

Capture attention events for canceled requests, read event-file XML, compare Query Store aborts, and inspect transaction cleanup.

Read More
Gouache painting of a flower shop with an open door and a cart of vermilion tulip crates outside

QDS_LOADDB Wait: Slow Startup and Query Store Load

June 10, 2020
Pinal Dave
SQL Performance
Query Store, SQL Server, SQL Wait Stats

A QDS_LOADDB wait means a database waits for Query Store to load its data at startup. This post reads the wait, checks the size of a store, explains the trace flag that loads Query Store asynchronously, and shows the settings that keep a store small.

Read More
Gouache painting of a wide channel splitting into small garden channels through one vermilion sluice gate

Query Store On or Off for Every Database: Review First

April 25, 2020
Pinal Dave
SQL Tips and Tricks
Query Store, SQL DMV, SQL Scripts, SQL Server Configuration

To turn Query Store on or off for every database, you need one statement per database, because there is no server switch. This post builds a tested script that writes the statements, lets you read them and then runs them in one batch. It also covers READ_ONLY mode and the model database.

Read More
Previous 1 2 3 4 5 … 9 Next
  • Books
  • Testimonials
  • Privacy Policy

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