AI Can Now Write Code That Makes Databases 2x Faster
This could make every app you use feel snappier and cheaper to run.
Databases are like giant digital filing cabinets behind almost every app you use — your bank, your social media feed, your online shopping cart. When you tap a button, an app asks a database for information, and the speed of that request affects how snappy everything feels. Companies constantly look for ways to speed up these databases, and one powerful tool is the GPU — a chip originally built for graphics, but great at handling lots of math at once.
But here's the catch: making a database run well on a GPU usually requires writing "kernels" — small, highly specialized pieces of code that tell the chip exactly how to process data. That's hard, time-consuming work done by expert engineers. This new research, called DataKernelBench, asked a simple question: can AI language models write these kernels automatically, and do it well enough to beat human-written code?
Turns out, the answer is often yes. The researchers tested ten AI models on a standard database benchmark with one powerful H100 GPU. The best AI-generated code made queries run 2.11 times faster than the standard baseline. When they scaled up to a much larger dataset spread across four GPUs, the speedup reached 2.54 times. The AI was especially clever at combining multiple steps into one operation and changing how the work was scheduled.
The catch: the research is a lab result, not a product you can use tomorrow. AI still needs to be shown the entire query, not just a snippet, and its work needs careful checking. But the implication is huge. If AI can write this kind of low-level code reliably, it could slash the cost of running massive databases and make every app that relies on them faster — without waiting for humans to write every line by hand. For now, it's a promising step toward a future where AI handles the boring, complex plumbing of the internet.
- AI models wrote database code that ran 2.11x faster than standard code on one GPU.
- On a larger dataset with four GPUs, the AI hit a 2.54x speedup.
- This could lead to cheaper, faster apps, but it's still early-stage research.
Why It Matters
Faster, cheaper data processing could lower costs and improve response times for any app you use every day.