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 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
Gouache painting of a row of white beehives in a meadow, some open and some closed, one vermilion

Query Store Status for Every Database in SQL Server

April 24, 2020
Pinal Dave
SQL Performance
Query Store, SQL DMV, SQL Scripts, SQL Server Configuration

Query Store status for every database takes two queries, and the first is not enough. This post builds four demo databases, shows why the is_query_store_on flag hides frozen and read-only states, and runs one script that reads the real state of each database. It also shows what Query Store costs in memory.

Read More
Illustrated cover: The Blocking Tree

SQL SERVER – Blocking Tree – Identifying Blocking Chain Using SQL Scripts

April 20, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Lock, SQL Scripts, SQL Server

Whenever I end up on a situation where we have lots of blocking issues with my client, I depend on the script of the Blocking Tree.

Read More
Gouache painting of an overflowing vermilion basket of linens beside a single copper washtub

Query for CPU Pressure: Sample the Scheduler Queue

April 2, 2020
Pinal Dave
SQL Performance
SQL CPU, SQL DMV, SQL Monitoring, SQL Scripts

To sample the scheduler queue, read the runnable counts of every scheduler eight times, one second apart, and compare the result with a baseline. This post shows the queue on a quiet server and again while more busy sessions than schedulers run. It reads the spread, the streak and the average that tell pressure from noise.

Read More
Gouache painting of a half-woven basket with a bundle of reeds and one vermilion reed where the weaving stopped

Canceled Query Plan: Three Ways to Capture It in SQL Server

April 1, 2020
Pinal Dave
SQL Performance
Execution Plan, Query Store, SQL DMV, SQL Server Management Studio

A canceled query plan can be captured with Live Query Statistics, with a live plan query while the statement runs, or from Query Store after the cancel. This post runs a long query, reads its plan while it runs, cancels it and then reads the aborted run from Query Store. It also explains which plan each method returns.

Read More
A wooden cable drum on a quay paying out rope, a red chalk mark on the rope showing how far it has moved.

Batch Requests and Compilations per Second From T-SQL

March 26, 2020
Pinal Dave
SQL Performance
Recompile, SQL Cache, SQL Counter, SQL DMV, SQL Server

Calculate compilations per second from cumulative SQL Server counters, compare batch rates, and investigate single-use plans with context.

Read More
One bowl of tiles supplies two distinct mosaic arrangements

What is the Difference Between sql_handle and plan_handle?- Interview Question of the Week #269

March 22, 2020
Pinal Dave
SQL Interview Questions and Answers
SQL Cache, SQL DMV, SQL Memory, SQL Scripts, SQL Server

Question: What is the Difference Between sql_handle and plan_handle?
Answer: I was recently asked this question. Let us see the answer today.

Read More
Previous 1 … 7 8 9 10 11 12 13 … 44 Next
  • Books
  • Testimonials
  • Privacy Policy

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