Database Administration — Sat Jan 31

← Home | ← database-admin

DBA Toolkit SQL Server Cached Plans by CPU

Sat Jan 31
#sql-server #dba #monitoring #troubleshooting #sessions #blocking #waits #locks #backups #always-on #performance #tool-kit

What is this?

This query lets you deep dive into live sessions — who’s running what, how long it’s been running, what it’s waiting on, and whether it’s blocking something else.

As a DBA, this is where theory meets reality.

The moment someone writes a query and hits execute, the SQL Server Optimizer steps in. It doesn’t just run what was written — it rewrites, reshapes, and reorders it to try and produce the most efficient execution plan based on statistics, indexes, and cost estimates.

What you think your query is doing… … and what it’s actually doing on disk and in memory can be two very different things.

That’s where the execution plan comes in.

When you look at the actual execution plan, you’re seeing the real-world path SQL Server chose — which indexes were used, where scans happened instead of seeks, whether it spilled to tempdb, whether parallelism kicked in, and where the expensive operators live.

This is not guesswork. This is evidence.

Block, lock and waits Requests Script

Cached Plans by CPU.sql
    Loading…
  

Gareth Winterman