{"slug": "gendb-llm-powered-generative-query-engine", "title": "GenDB – LLM-Powered Generative Query Engine", "summary": "Researchers introduced GenDB, a generative query engine that uses five specialized LLM agents to produce instance-optimized native executables for analytical queries, outperforming DuckDB, Umbra, ClickHouse, MonetDB, and PostgreSQL on TPC-H and SEC-EDGAR benchmarks. The system profiles hardware, data, and workload to generate tailored storage, indexes, and execution plans with SIMD and parallelism, achieving up to 1.30x speedup over optimized C++ code. GenDB's multi-agent pipeline enables new techniques through prompt updates rather than system re-engineering, with plans to add a Code Refiner agent and support for GPU and multimodal data.", "body_md": "GenDB is a Generative Query Engine that uses LLM agents to generate instance-optimized query execution code, tailored to your specific data, workloads, and hardware.\n\nFive specialized LLM agents collaborate through a structured pipeline to generate optimized storage, indexes, and standalone native executables — all tailored to the specific data, workload, and hardware.\n\nProfiles hardware, samples data, extracts workload characteristics\n\nDesigns layouts with encoding, compression, indexes, and zone maps\n\nGenerates resource-aware execution plans adapted to data and hardware\n\nImplements plans as optimized native code with SIMD and parallelism\n\nIteratively refines code using runtime profiling feedback\n\nToday, every new use case demands either a painful extension or an entirely new system:\n\nOption 3 — Generate\n\nUse LLMs to **generate per-query execution code**. No extension wrestling, no multi-year engineering. New techniques become reachable through prompt updates.\n\nInstance-optimized code exploits exact data distributions, join selectivities, group cardinalities, and hardware characteristics. No general-purpose engine can match this.\n\nIntegrating new techniques requires prompting, not re-engineering. [Semantic queries](https://sembench.org), [GPU-native code](https://vldb.org/cidrdb/papers/2026/p12-yogatama.pdf) — all reachable through prompt updates.\n\n[80% of queries repeat in 50% of clusters](https://www.vldb.org/pvldb/vol17/p3694-saxena.pdf). Generation cost is amortized over many executions, making it cost-effective for recurring analytical workloads.\n\nTotal query execution time across all queries. GenDB variants use different LLM backbone models. All systems run on identical hardware with full parallelism enabled.\n\n| # | System | Total Time | vs. Best GenDB | Relative |\n|---|\n\n| # | System | Total Time | vs. Best GenDB | Relative |\n|---|\n\nDifferent LLM backbone models offer different trade-offs between generated code quality, generation time, and cost. Ranked by average query execution time.\n\nWe select the best-performing C++ binary for each TPC-H query from a GenDB run, then give\n**Claude Code (Opus 4.6)** 5 iterations to analyze, profile, and improve —\nfirst for optimized C++, then for a full Rust rewrite.\n\nGenDB-generated code with standard compilation.\n\nAggressive flags, madvise tuning, parallelized joins, thread optimization.\n\nFull rewrite with rayon, memmap2, unsafe bounds-check elimination.\n\n| Query | Original C++ | Optimized C++ | Rust | Best |\n|---|---|---|---|---|\n| Q1 | 49.8 ms | 39.2 ms | 71.7 ms | Opt. C++ |\n| Q3 | 25.0 ms | 26.0 ms | 52.5 ms | Orig. C++ |\n| Q6 | 31.8 ms | 35.5 ms | 23.7 ms | Rust |\n| Q9 | 85.4 ms | 64.4 ms | 101.9 ms | Opt. C++ |\n| Q18 | 49.2 ms | 20.1 ms | 32.8 ms | Opt. C++ |\n| Total | 241.2 ms | 185.2 ms | 282.6 ms | Opt. C++ (1.30x) |\n\n**Key findings:** Optimized C++ achieves a 1.30x overall speedup, with Q18 showing the largest gain (2.44x) from parallelized join building.\nRust wins on Q6 (zone-map scan with `get_unchecked`\n\n) but carries ~30ms per-query overhead from mmap page table setup, penalizing short queries.\nThe Rust `main_scan`\n\ncompute times are competitive with C++, suggesting the overhead is structural rather than algorithmic.\nWe plan to introduce a dedicated **Code Refiner** agent to the pipeline, responsible for low-level, implementation-level optimizations — to automatically achieve these gains as part of the standard GenDB workflow.\n\nGenDB is under active development. Every step follows three principles:\n\nMulti-agent pipeline for analytical queries. Evaluated on TPC-H and SEC-EDGAR, outperforming DuckDB, Umbra, ClickHouse, MonetDB, and PostgreSQL.\n\nAgents learn from past runs, accumulate optimization experience, and improve generation quality over time — without retraining the underlying LLMs.\n\nGenerate CUDA and GPU-accelerated code targeting libcudf for cost-efficient GPU analytics, not just CPU.\n\nGenerate code for multimodal data — images, audio, text — with AI-powered operators, moving beyond SQL’s relational model.\n\nReusable operators across queries, query template generation, hybrid execution with traditional DBMS, and further cost reduction as LLMs become faster and cheaper.", "url": "https://wpnews.pro/news/gendb-llm-powered-generative-query-engine", "canonical_source": "https://solidlao.github.io/GenDB/", "published_at": "2026-06-18 02:35:48+00:00", "updated_at": "2026-06-18 02:52:16.977790+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-tools", "generative-ai", "ai-research"], "entities": ["GenDB", "DuckDB", "Umbra", "ClickHouse", "MonetDB", "PostgreSQL", "Claude Code", "SEC-EDGAR"], "alternates": {"html": "https://wpnews.pro/news/gendb-llm-powered-generative-query-engine", "markdown": "https://wpnews.pro/news/gendb-llm-powered-generative-query-engine.md", "text": "https://wpnews.pro/news/gendb-llm-powered-generative-query-engine.txt", "jsonld": "https://wpnews.pro/news/gendb-llm-powered-generative-query-engine.jsonld"}}