investigate-sql-cpu-pressure

Installation
SKILL.md

CPU Pressure Investigation

Purpose

This is the primary entry point for investigating CPU pressure and high CPU consumption in SQL Server and Azure SQL. Use when a user reports:

  • High CPU usage or CPU % alerts
  • Queries running slowly due to scheduler pressure
  • SOS_SCHEDULER_YIELD, THREADPOOL, or CXPACKET waits
  • Azure SQL DTU/vCore CPU throttling

This skill orchestrates a layered investigation:

  1. Checking edition-appropriate CPU signals (resource stats on Azure SQL; scheduler snapshot on SQL Server)
  2. Identifying real-time CPU consumers and their wait types
  3. Shortlisting active offender hashes for targeted SQL text and plan analysis
  4. Reviewing historical plan-cache or database-scoped Query Store data for CPU consumers
  5. Detecting memory-grant waits and reduced grants that may contribute to spills
  6. Identifying plan quality smells (implicit conversions, spills, missing-index hints, key lookups, and scalar UDFs) by inspecting live plan XML
  7. Conditional: when the evidence points to specific workload queries, retrieving and analyzing the full SQL text and cached plan for the top offending query_hash values to produce concrete tuning recommendations
Installs
31
GitHub Stars
66
First Seen
11 days ago