JetStream boosts database query speed with safe custom accelerators
JetStream: Generating Verified Query Accelerators for Existing Database Systems
Databases
Summary
Traditional methods to speed up database queries often require moving data or stopping updates, which can be inconvenient. The authors developed JetStream, a tool that creates special helper programs that run within existing databases without changing where data is stored. Some of these helpers are tested for correctness, while others come with mathematical proofs ensuring their results are always right. JetStream demonstrated much faster query speeds on standard tests and could keep up even when the data was frequently updated.
What this means in practice
- •For database administrators: Create verified query accelerators that safely speed up complex queries without migrating data or losing update flexibility.
- •For financial analytics teams: Accelerate large-scale analytic queries on transactional databases while ensuring query results remain correct despite frequent data changes.
Authors
Akhilesh Balasingam, Amadou Ngom, Geoffrey X. Yu, Tim Kraska
Abstract
Recent work has shown that LLMs can synthesize highly specialized database systems for fixed workloads, but these systems replace the DBMS's native storage and assume static data: users must migrate their data, often give up ad-hoc queries, and lose acceleration once the data changes. We present JetStream, which instead generates query-specific accelerators that extend an existing DBMS. Given a set of parametrized query templates, a staged agentic workflow synthesizes accelerators that run directly over the DBMS's native tables and may maintain custom auxiliary state, while the DBMS remains responsible for storage, transactions, recovery, and all other queries. A fixed, engine-neutral substrate handles engine-specific hooks and keeps auxiliary state transactionally consistent under writes. JetStream generates two kinds of accelerators: tested accelerators, which may use any optimization and are validated by differential testing, and verified accelerators which trade some performance for a machine-checked proof that every answer satisfies a trusted specification derived from the SQL. On TPC-H at SF=20, JetStream achieves a $315 \times$ geomean read speedup over DuckDB ($93 \times$ verified) and retains $120 \times$ under a continuous update stream of 10,000 modified rows per second.