GenDB: The Next Generation of Query Processing -- Synthesized, Not Engineered
This presentation explores GenDB, a paradigm-shifting database system that replaces decades of hand-engineered query processing with LLM-driven, instance-optimized code generation. Through multi-agent reasoning and hardware-aware optimization, GenDB demonstrates how AI can synthesize query execution code that outperforms traditional database engines by up to 11× on complex analytical workloads, while enabling unprecedented extensibility for emerging data types and hardware architectures.Script
Every database engine you use today—from PostgreSQL to DuckDB—is the result of decades of expert engineering, carefully tuned for general workloads. But what if, instead of one monolithic engine serving all queries, each query got its own custom-built execution code, optimized for that specific data, that hardware, and that exact task? That's the radical premise of GenDB, which uses large language models to synthesize query processors instead of engineering them.
The authors identify a fundamental constraint: conventional database systems are locked into manually engineered abstractions that worked well for yesterday's hardware and yesterday's queries. Extending these systems to handle semantic search over images, or to exploit new GPU architectures, requires rewriting core components—a process measured in engineer-years, not days.
GenDB breaks this cycle by treating query processing as a code synthesis problem.
GenDB deploys specialized agents in sequence: one analyzes workload characteristics and hardware topology, another designs storage layouts and indexes tailored to the data distribution, a third constructs resource-aware execution plans, and a final agent synthesizes executable code in C++ or Python. Each agent reasons about constraints, invokes tools, and communicates through structured protocols, enabling optimization granularity impossible in static systems.
The results are striking. On TPC-H, GenDB executes five representative queries in 214 milliseconds total—2.8 times faster than DuckDB and Umbra, and over 11 times faster than ClickHouse. The performance gap widens with query complexity: for TPC-H query 9, a five-way join, GenDB achieves a 6.1-fold speedup over DuckDB. On the SEC-EDGAR benchmark, designed to avoid training data contamination, GenDB maintains a 5-fold advantage. Iterative optimization is dramatic—one query drops from over 12 seconds to 74 milliseconds after a single refinement iteration, a 163-fold improvement driven by cache-conscious operator fusion and index-aware scans.
Ablation studies reveal that the multi-agent structure is not incidental. Collapsing the pipeline into a single agent—even when provided domain hints—degrades performance by up to 4 times and increases inference costs. The hierarchical decomposition enforces reasoning discipline: each agent operates within a constrained solution space, producing verifiable intermediate artifacts that guide downstream stages. This structured approach is essential for queries and schemas the language model has never seen.
GenDB demonstrates that the next generation of database systems may not be engineered in the traditional sense at all—they may be synthesized, per query, by intelligent agents that understand your data, your hardware, and your goals better than any static optimizer ever could. To explore more research at the frontier of AI and systems, visit EmergentMind.com and create your own videos.