بنقرة واحدة
sql-explainer
Explain SQL queries, execution plans, and performance issues in plain English with rewrites
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Explain SQL queries, execution plans, and performance issues in plain English with rewrites
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Generate system architecture diagrams as Mermaid, PlantUML, or ASCII art from a description or codebase
Convert images or video frames to ASCII art, or generate ASCII animations from descriptions
Generate concept maps, mind maps, and ER diagrams from free-form descriptions
Design, implement, and debug ETL/ELT pipelines — batch or streaming, any source/sink
Guide incident response: triage, diagnosis, mitigation, communication, and post-mortem
Triage application and system logs to find root causes, anomalies, and error patterns
| name | sql-explainer |
| description | Explain SQL queries, execution plans, and performance issues in plain English with rewrites |
| category | data |
Explain SQL queries, analyse execution plans, identify performance bottlenecks, and suggest rewrites.
For any query:
WHAT IT DOES (one sentence)
STEP BY STEP:
1. FROM / JOIN — which tables, join type and implications
2. WHERE — filters, sargability (can indexes be used?)
3. GROUP BY / HAVING — aggregation logic
4. SELECT — columns, computed expressions
5. ORDER BY / LIMIT — sort and pagination
EDGE CASES:
- NULLs: which columns and how they affect results
- Empty sets: what happens if a subquery returns no rows
- Duplicates: expected or a bug?
PERFORMANCE NOTES:
- Estimated scan type
- Columns that should have indexes
- Estimated row count at each stage
ANALYZE needed).work_mem.| Anti-pattern | Fix |
|---|---|
SELECT * in subquery | Select only the join key |
NOT IN (subquery with NULLs) | Use NOT EXISTS |
| Correlated subquery in SELECT | LEFT JOIN + COALESCE |
DISTINCT hiding a bad join | Fix the join |
ORDER BY on un-indexed column with small LIMIT | Index the sort column |
EXPLAIN ANALYZE output before guessing at indexes.Paste the query (and optionally DDL + EXPLAIN output) and I will explain immediately.