JetStream speeds up known queries inside existing databases
JetStream: Generating Verified Query Accelerators for Existing Database Systems · arXiv:2610.20527
In plain words
Databases handle many kinds of queries, but that flexibility can make known queries slower. JetStream is a system that adds generated, query-specific accelerators to an existing database, which still handles storage, writes, and other queries.
Some accelerators keep extra data that saves work when answering a query. Across 22 tested queries, the stateful version had much faster reads on average than DuckDB. That result describes the tested queries, not every database or query.
The research
Can known database queries run faster without moving data into a separate system or giving up writes and less predictable queries? JetStream addresses that tension by attaching generated query accelerators to an existing database, which remains responsible for storage and other operations.
JetStream generates query accelerators beside an existing database, with optional maintained summaries and proofs, to speed known queries while preserving the host’s other work.
Read-only TPC-H results compare JetStream with DuckDB across all 22 queries at scale factor 20. Stateless accelerators had a 2.1x geometric-mean read speedup at 32 threads; stateful accelerators had 315x, and verified ones had 93x.
These geometric means combine per-query speedup ratios, so they summarize the tested queries rather than describe every query. With one refresh every 15 seconds, the geometric-mean workload speedup across the 22 queries was 120.5x over DuckDB, counting reads and maintenance costs.
The results cover the tested TPC-H workload and six SEC-EDGAR queries, not every database workload. The verified-answer guarantee also depends on host input and commit-order contracts, as well as trusted SQL translation and host interfaces.
What the evidence shows
- Keep the host database
JetStream is a system that generates accelerators for declared query templates and adds them to an existing database. The database keeps its native storage and remains responsible for transactions, recovery, and queries without accelerators.
This addresses a tradeoff in specialized database systems: tailoring execution to known queries can improve speed, while replacing storage or limiting query support can make writes and other queries harder to handle.
- Compare read performance
The TPC-H test covers 22 database queries at scale factor 20; read speedups compare query execution with DuckDB and are geometric means of per-query ratios. At 32 threads, stateless JetStream, which works over the host’s storage without extra query-specific state, achieved a 2.1x geometric-mean read speedup.
Stateful JetStream achieved 315x, while its verified variant achieved 93x. These summarize the tested queries; they do not mean every query had that gain.
- Count the update cost
Read-only results do not account for the work needed to keep query-specific data current. In a separate TPC-H test, eight readers ran while one writer applied refreshes every 15 seconds, modifying about 10,000 rows per second.
The comparison counted both reads and commits, including JetStream’s maintenance. Across the 22 queries, JetStream’s geometric-mean workload speedup over DuckDB was 120.5x under that specific update stream.
- Test changing write patterns
The cost model also adapts how it maintains state as writes change. On TPC-H Q1, the authors tested four phases with different point and bulk write patterns, over 600 queries.
Compared with always-incremental maintenance, the selector reduced total workload time by a factor of 1.9; compared with always rebuilding, by a factor of 1.25. This result is specific to Q1 and those four phases.
- Check another collection
The authors tested a separate workload built from financial-statement filings dated 2022–2024 at scale factor 3. Though it contains 1,000 generated queries, the comparison covered six.
JetStream’s geometric-mean read speedups on those six queries were 744x over DuckDB and 3,508x over PostgreSQL. This offers evidence on a different collection of data, while leaving most queries in that workload unevaluated.
Deep
- Original paper authors
- Akhilesh Balasingam, Amadou Ngom, Geoffrey X. Yu, Tim Kraska
- Submitted to arXiv
- License
- arXiv non-exclusive