AI/ databases · query-optimization · code-synthesis · benchmarks

New Database Writes Custom Code Per Query, Cuts Cost 59%

A research database system called KathDB generates custom code for each query on the fly, beating rivals by nearly 59% on a standard benchmark.

A database system that writes its own code while it runs just posted a 59% cost cut on a standard benchmark.

Researchers built KathDB-FAO, a new way for the KathDB database to answer questions asked in plain English. Instead of running a fixed set of prewritten operations, it breaks a query into small, well-defined actions, checks what each one needs and produces, and groups the compatible ones together. Then, for each group, it generates - synthesizes - a custom piece of code on the spot, tailored to that specific query. Tested against other systems on the SemBench benchmark, it cut execution cost by 58.8% on average, without sacrificing answer quality.

Most databases run one of a handful of generic strategies no matter what you ask, which wastes cycles on questions that don't need the full machinery. Writing bespoke code per query - rather than picking from a preset menu - is a bet that generated code can beat hand-tuned code, at least for now. If that holds up outside a single benchmark, it is a meaningful shift in how databases that handle natural-language queries get built.

One benchmark and one lab's numbers are not proof of a trend - and 'writes its own code for every query' is also exactly the kind of complexity that tends to bite back in production.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →