Skip to main content

One post tagged with "low-latency"

View All Tags

Maintainable, Low-Latency and High-Quality Query Compilation with MLIR and TPDE

ยท 16 min read
Jonas Ladner
Student Research Assistant | Master@TUM

Compiling a TPC-H query in LingoDB used to take around 35ms. It now takes around 5ms, and the generated code is just as fast as before on small datasets. The largest part of that came from machine code generation, which dropped from 26ms to 0.57ms, and the rest from tuning MLIR itself. MLIR-based query engines usually pay 50 to 150ms of compilation latency for a typical analytical SQL query. That overhead dominates the total latency on small datasets, and it is what kept LingoDB behind Hyper, Umbra and DuckDB. In this blog post we explain how to tune MLIR for low-latency and how to combine it with TPDE to allow for near instant query compilation. This blog post builds on our ADMS'26 workshop paper: Maintainable, Low-Latency and High-Quality Query Compilation with MLIR and TPDE.