duckdb-expert

Run TPCH benchmarks and analyze DuckDB query execution plans.

1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/ztdevelops/claude-code-skills --skill duckdb-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: duckdb-expert
Source: https://github.com/ztdevelops/claude-code-skills/tree/main/private/personal/duckdb-expert
Command: npx skills add https://github.com/ztdevelops/claude-code-skills --skill duckdb-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, bc, and includes scripts (resource) components.

What problem does it solve?

This Skill provides an expert-level, modular assistant for running rigorous DuckDB performance work: it orchestrates TPCH benchmarking, interprets execution plans for query optimization, and explains DuckDB internals so engineers can diagnose and fix performance issues quickly and reproducibly.

Core Features & Use Cases

  • Coordinated Subagents: Delegates tasks to tpch-benchmarker, duckdb-optimizer, and duckdb-internals for focused expertise.
  • TPCH Benchmarking: Generates TPCH data, runs strict 1 cold + N warm run benchmarks, logs everything, and produces DUCKDB_STATS.md and DUCKDB_ANALYSIS.md.
  • Query Optimization: Interprets EXPLAIN / EXPLAIN ANALYZE output, identifies bottlenecks, and suggests targeted rewrites or configuration changes.
  • Internals & Configuration: Explains columnar storage, vectorized execution, memory limits, threading, and trade-offs for performance tuning.
  • Helper Script: Includes a reproducible duckdb_benchmark.sh script to enforce threads=1 and memory_limit='1GB' and to collect timing statistics.

Quick Start

Run a TPCH benchmark for query 5 on tpch.duckdb with 5 warm runs and save the results to DUCKDB_STATS.md and DUCKDB_ANALYSIS.md.

Frequently Asked Questions about duckdb-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a strict TPCH benchmark on a local DuckDB database?

Run a strict TPCH benchmark on DuckDB using the included helper script, which enforces 1 cold run plus N warm runs with threads=1 and memory_limit='1GB', then generates DUCKDB_STATS.md and DUCKDB_ANALYSIS.md.

What is the best way to optimize slow DuckDB queries using EXPLAIN ANALYZE?

Optimize slow DuckDB queries by running EXPLAIN ANALYZE to interpret execution plans, identify bottlenecks, and apply targeted query rewrites or configuration changes for better performance.

How does DuckDB vectorized execution and columnar storage affect query performance?

DuckDB vectorized execution and columnar storage process data in batches to reduce overhead and improve cache efficiency, which is crucial for diagnosing performance limits during query optimization.

Can I control memory limits and threading for DuckDB performance tuning?

Control DuckDB memory limits and threading by setting configuration parameters like memory_limit='1GB' and threads=1 to ensure strict, reproducible benchmarking and performance tuning.

Why does my DuckDB TPCH benchmark produce inconsistent timing results?

Inconsistent DuckDB TPCH benchmark timing often results from not isolating cold runs from warm runs or failing to enforce strict memory and thread limits, which the helper script prevents.

Do I need to install specific dependencies to run DuckDB benchmarking scripts?

You need to install DuckDB and bc dependencies to execute the benchmarking scripts and collect timing statistics for strict TPCH methodology analysis.