LLM 优化数据库查询执行:Together AI 联合研究实现显著加速
原标题:AI for Systems: Using LLMs to Optimize Database Query Execution
AI 摘要
Together AI 与斯坦福大学、威斯康星大学麦迪逊分校及 Bauplan 合作,测试了 LLM 优化数据库查询执行计划的能力。他们推出了 DBPlanBench 工具,通过将物理计划序列化为紧凑的 JSON 格式,让 LLM 生成局部补丁来改进连接顺序等,从而在不修改数据库引擎的情况下提升性能。实验显示,在 TPC-H 和 TPC-DS 工作负载上,中位加速约 1.1-1.2 倍,某些复杂查询可达 4.78 倍加速,并显著降低资源消耗。
正文节选
We worked in collaboration with Stanford University, the University of Wisconsin–Madison, and Bauplan to test whether LLMs can optimize database query execution plans. The results show that LLM-guided plan rewrites can improve execution performance without modifying the database engine itself. Recent advances in AI have been driven by improvements in the underlying systems infrastructure. But this relationship does not have to be asymmetric: AI and LLMs can also be used to optimize the functiona