cd /news/large-language-models/gendb-llm-powered-generative-query-e… · home topics large-language-models article
[ARTICLE · art-31983] src=solidlao.github.io ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

GenDB – LLM-Powered Generative Query Engine

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.

read3 min views1 publishedJun 18, 2026

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.

Five 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.

Profiles hardware, samples data, extracts workload characteristics

Designs layouts with encoding, compression, indexes, and zone maps

Generates resource-aware execution plans adapted to data and hardware

Implements plans as optimized native code with SIMD and parallelism Iteratively refines code using runtime profiling feedback

Today, every new use case demands either a painful extension or an entirely new system:

Option 3 — Generate

Use LLMs to generate per-query execution code. No extension wrestling, no multi-year engineering. New techniques become reachable through prompt updates. Instance-optimized code exploits exact data distributions, join selectivities, group cardinalities, and hardware characteristics. No general-purpose engine can match this.

Integrating new techniques requires prompting, not re-engineering. Semantic queries, GPU-native code — all reachable through prompt updates.

80% of queries repeat in 50% of clusters. Generation cost is amortized over many executions, making it cost-effective for recurring analytical workloads.

Total query execution time across all queries. GenDB variants use different LLM backbone models. All systems run on identical hardware with full parallelism enabled.

| # | System | Total Time | vs. Best GenDB | Relative |

|---| | # | System | Total Time | vs. Best GenDB | Relative |

|---| Different LLM backbone models offer different trade-offs between generated code quality, generation time, and cost. Ranked by average query execution time.

We select the best-performing C++ binary for each TPC-H query from a GenDB run, then give Claude Code (Opus 4.6) 5 iterations to analyze, profile, and improve — first for optimized C++, then for a full Rust rewrite.

GenDB-generated code with standard compilation.

Aggressive flags, madvise tuning, parallelized joins, thread optimization.

Full rewrite with rayon, memmap2, unsafe bounds-check elimination.

Query Original C++ Optimized C++ Rust Best
Q1 49.8 ms 39.2 ms 71.7 ms Opt. C++
Q3 25.0 ms 26.0 ms 52.5 ms Orig. C++
Q6 31.8 ms 35.5 ms 23.7 ms Rust
Q9 85.4 ms 64.4 ms 101.9 ms Opt. C++
Q18 49.2 ms 20.1 ms 32.8 ms Opt. C++
Total 241.2 ms 185.2 ms 282.6 ms Opt. C++ (1.30x)

Key findings: Optimized C++ achieves a 1.30x overall speedup, with Q18 showing the largest gain (2.44x) from parallelized join building. Rust wins on Q6 (zone-map scan with get_unchecked

) but carries ~30ms per-query overhead from mmap page table setup, penalizing short queries. The Rust main_scan

compute times are competitive with C++, suggesting the overhead is structural rather than algorithmic. We 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.

GenDB is under active development. Every step follows three principles:

Multi-agent pipeline for analytical queries. Evaluated on TPC-H and SEC-EDGAR, outperforming DuckDB, Umbra, ClickHouse, MonetDB, and PostgreSQL.

Agents learn from past runs, accumulate optimization experience, and improve generation quality over time — without retraining the underlying LLMs.

Generate CUDA and GPU-accelerated code targeting libcudf for cost-efficient GPU analytics, not just CPU.

Generate code for multimodal data — images, audio, text — with AI-powered operators, moving beyond SQL’s relational model.

Reusable operators across queries, query template generation, hybrid execution with traditional DBMS, and further cost reduction as LLMs become faster and cheaper.

── more in #large-language-models 4 stories · sorted by recency
── more on @gendb 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/gendb-llm-powered-ge…] indexed:0 read:3min 2026-06-18 ·