技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
django-query-plan-reading【数据与研究】Read and compare Django/PostgreSQL query execution plans using QuerySet.explain(), EXPLAIN, EXPLAIN ANALYZE, scan types, joins, estimates, actual timing, buffers, and row counts. Use when one SQL query dominates Django latency or when an index, ORM rewrite, pagination change, or materialized view needs proof from a query plan.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when the expensive unit is a specific SQL statement or queryset. The goal is to explain why the database is doing work, not to guess from the ORM code.
Get the exact query.
Generate a plan.
queryset.explain() for ORM-owned SQL.EXPLAIN for raw SQL, views, materialized views, or SQL copied from logs.analyze=True only in a safe environment because the database executes the query.Read from the deepest node outward.
Decide the next change.
django-index-design.django-db-side-computation or django-materialized-views.django-pagination-performance.Re-run the same plan after the change.
See explain-checklist.md for plan-reading cues and before/after review notes.
EXPLAIN ANALYZE executes the query. Avoid it for mutations, unsafe functions, and production paths unless you know the impact.Finish with the before/after plan excerpt and a plain explanation of which node changed and why that matters.