← ClaudeAtlas

duckdb-profilelisted

Diagnose slow DuckDB 2.0 queries and unhealthy Parquet layouts. Covers EXPLAIN versus EXPLAIN ANALYZE, estimate and actual row gaps, full scans, join blowups, row-group pruning, spill, and schema drift. Use when a query is slow, scans too much, returns a huge join, runs out of memory, or a Parquet dataset needs a health check.
srimon12/duckdb-2-skills · ★ 1 · Data & Documents · score 65
Install: claude install-skill srimon12/duckdb-2-skills
# Query and file diagnostics Diagnosis follows a six-stage loop: frame the symptom, capture a plan, localize the dominant cost, classify the cause, change one thing, and prove the change. Treat plan operators as evidence, not diagnoses. Execute DuckDB with `duckdb`. For query semantics, consult `duckdb-sql`; for reader and writer parameters, consult `duckdb-files`; when time is spent outside SQL in host code, consult `duckdb-python`. For the diagnosis protocol and cost model, read [references/diagnosis.md](references/diagnosis.md). For operator specifications and JSON structures, read [references/plans.md](references/plans.md). ## Start with the symptom | Symptom | First move | Proof | | --- | --- | --- | | Slow, correct result | Run `EXPLAIN`, then `EXPLAIN ANALYZE` | Dominant operator rows and elapsed timings fall | | Out of memory | Locate blocking operator holding peak intermediate rows | `system.peak_temp_dir_size` and memory drop | | Filter reads every row group | Inspect filter expression and physical column ordering | `Row Groups Scanned` drops below total groups | | Join multiplies input rows | Check join key uniqueness and input cardinalities | Join output matches expected cardinality | | Schema changed or columns missing | Check schema drift across files in `duckdb-files` | Every file matches expected schema | | Wrong value returned without error | Inspect SQL semantics in `duckdb-sql` result traps | Result is proven correct before optimizing | A wrong answer