Dispatch
Together AI + Stanford Research: LLMs Optimize Database Query Execution Plans — 4.78x Speedup by Correcting Cardinality Estimation Errors
New research from Together AI, Stanford, UW-Madison, and Bauplan shows LLMs can function as semantic cardinality estimators to rewrite database query execution plans. In a TPC-DS benchmark, the LLM-optimized plan inverted join order to apply a date filter early, pruning 15.1M rows to 2.9M before subsequent joins — achieving 4.78x speedup, reducing hash-table build time from 10.16s to 0.41s, and cutting memory from 3.3GB to 411MB. No database engine modifications required.
↳ Follow the thread