Traditional query processing relies on engines that are carefully optimized and engineered by many experts. However, new techniques and user requirements evolve rapidly, and existing systems often cannot keep pace. At the same time, these systems are difficult to extend due to their internal complexity, and developing new systems requires substantial engineering effort and cost. In this paper, we argue that recent advances in Large Language Models (LLMs) are starting to shape the next generation of query processing systems. We propose using LLMs to synthesize execution code for each incoming query, instead of continuously building, extending, and maintaining complex query processing engines. As a proof of concept, we present GenDB, an LLM-powered agentic system that generates instance-optimized and customized query execution code tailored to specific data, workloads, and hardware resources. We implemented an early prototype of GenDB that uses Claude Code Agent as the underlying component in the multi-agent system, and we evaluate it on OLAP workloads. We use queries from the well-known TPC-H benchmark and also construct a new benchmark designed to reduce potential data leakage from LLM training data. We compare GenDB with state-of-the-art query engines, including DuckDB, Umbra, MonetDB, ClickHouse, and PostgreSQL. GenDB achieves significantly better performance than these systems. Finally, we discuss the current limitations of GenDB and outline future extensions and related research challenges.
翻译:传统查询处理依赖于由众多专家精心优化和设计的引擎。然而,新技术和用户需求快速演变,现有系统往往难以跟上步伐。同时,由于内部复杂性,这些系统难以扩展,而开发新系统则需要大量的工程投入和成本。本文认为,大型语言模型(LLMs)的最新进展正在塑造下一代查询处理系统。我们提出利用LLMs为每个传入查询合成执行代码,而非持续构建、扩展和维护复杂的查询处理引擎。作为概念验证,我们提出了GenDB,这是一个由LLM驱动的智能体系统,能够生成针对特定数据、工作负载和硬件资源进行实例优化和定制的查询执行代码。我们实现了GenDB的早期原型,该系统在多智能体架构中以Claude Code Agent作为底层组件,并在OLAP工作负载上对其进行了评估。我们使用了知名TPC-H基准测试中的查询,并构建了一个旨在减少LLM训练数据潜在泄露的新基准。我们将GenDB与包括DuckDB、Umbra、MonetDB、ClickHouse和PostgreSQL在内的先进查询引擎进行了比较。GenDB的性能显著优于这些系统。最后,我们讨论了GenDB当前的局限性,并概述了未来的扩展方向及相关研究挑战。