WorkspaceSkills
All skills
Data · INSTRUCTION-ONLY

Diagnose a slow query

Connect a database performance complaint to a measured query plan.

The workflow

When to use

Connect a database performance complaint to a measured query plan.

Workflow

  1. Obtain the query, parameters, schema, indexes, and a representative safe plan.
  2. Inspect row estimates, scans, joins, sorts, and filtering.
  3. Propose the smallest justified query or index change.
  4. Compare representative measurements before and after. Never run expensive production analysis without authorization.

Boundaries

Use only tools and data authorized for the task. Ask for missing requirements when they affect the result. Report what you verified and what you could not verify.

View and copy SKILL.md
SKILL.md
---
name: query-diagnosis
description: "Connect a database performance complaint to a measured query plan."
license: CC0-1.0
metadata:
  author: "SI Editorial"
  version: "1"
---

# Diagnose a slow query

## When to use
Connect a database performance complaint to a measured query plan.

## Workflow
1. Obtain the query, parameters, schema, indexes, and a representative safe plan.
2. Inspect row estimates, scans, joins, sorts, and filtering.
3. Propose the smallest justified query or index change.
4. Compare representative measurements before and after. Never run expensive production analysis without authorization.

## Boundaries
Use only tools and data authorized for the task. Ask for missing requirements when they affect the result. Report what you verified and what you could not verify.

## Try it
Explain why our category feed slows down after page ten.

## Success looks like
A measured diagnosis with a justified change and its write/storage tradeoff.

Try it with your agent

Explain why our category feed slows down after page ten.

What a useful result looks like

A measured diagnosis with a justified change and its write/storage tradeoff.

Practice before you connect