Skip to main content

inspect-a-database-query-plan

Inspect a database query plan through operators, estimates, actual work, memory, I/O, and locking evidence. Use when a query is slow, unstable, or unexpectedly expensive.

소스 정보

저장소
protosphinx/sphinxstack
최근 소스 활동
2026년 7월 29일 13:55
감지된 SKILL.md 언어
영어
스타
3
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
inspect-a-database-query-plan
category
data
description
Inspect a database query plan through operators, estimates, actual work, memory, I/O, and locking evidence. Use when a query is slow, unstable, or unexpectedly expensive.
# inspect-a-database-query-plan Explain the work the database performed, then test the smallest evidence-based change. ## Procedure 1. Capture the exact normalized query, parameters, database version, schema, and representative data scale. 2. Obtain a safe estimated or actual plan without exposing sensitive literals. 3. Read the operator tree in execution order and identify scans, joins, sorts, aggregates, and exchanges. 4. Compare estimated and actual rows, loops, time, buffers, spills, and memory. 5. Check predicates, statistics, indexes, data skew, parameter sensitivity, locks, and concurrency. 6. Locate the first large estimation or work amplification, not only the most expensive displayed node. 7. Test one candidate change against representative and adversarial parameter sets. 8. Record before-and-after plans, runtime, resource use, and regression risk. ## Guardrails - Actual-plan collection can execute the query and may be unsafe for destructive statements. - Do not add an index solely because a plan mentions one. - A faster isolated query can still harm write cost or concurrent workloads. ## Done - A redacted query-plan analysis report is saved - Estimates, actual work, and environmental assumptions are verified - Any proposed change is tested against representative parameters and concurrency
GitHub에서 보기