arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.09181cs.DB
收藏

评估基于大语言模型的索引优化的实用性效果:微软数据库优化顾问

Evaluating the Practical Effectiveness of LLM-Driven Index Tuning on Microsoft SQL Server

Microsoft Research(微软研究院)

Xiaoying Wang, Wentao Wu, Vivek Narasayya, Surajit Chaudhuri

AI总结:

本文通过工业基准和真实企业工作负载评估LLM驱动的索引优化效果,对比微软数据库优化顾问(DTA),发现LLM在部分情况下能提供更优执行时间配置,但生产环境中应用仍面临性能波动、集成影响和验证成本等挑战。

摘要:

索引优化对现代数据库系统性能至关重要。工业级索引优化器,如为微软SQL Server开发的数据库优化顾问(DTA),依赖查询优化器提供的“假设”API来估算查询成本,这可能导致推荐不理想。大语言模型(LLM)提供了一种新的索引优化方法,其知识来自大规模网络训练数据集。然而,LLM驱动的索引优化的有效性,尤其是超越现有商业索引优化器的性能,仍不明确。本文通过工业基准和真实企业客户工作负载研究LLM驱动的索引优化的实用性,并与DTA进行比较。我们的结果表明,尽管DTA总体上更可靠,但通过几次调用,LLM可以识别出在大量情况下显著优于DTA的配置,突显了其作为互补技术的潜力。我们还观察到,LLM的推理能够捕捉到人类直观的洞察力,这些洞察力可能被提炼出来以潜在地改进DTA。然而,将LLM驱动的索引优化应用于生产环境仍然具有挑战性,因为其性能波动较大,直接集成到DTA时往往产生有限甚至负面的影响,并且性能验证成本高。本文提供了动机、教训和实用见解,将激励学术界和工业界未来关于LLM驱动的索引优化的研究。

英文摘要:

Indexes are crucial for database performance. Index tuning, i.e., selecting appropriate indexes for a database workload, is an important problem. The state-of-the-art index tuning tools in the industry, e.g., Database Tuning Advisor (DTA) developed for Microsoft SQL Server, rely on a "what-if" API, which can estimate the cost of a query for a given index configuration. They take as input a SQL workload and constraints such as a storage bound, and search over the large space of index configurations to find one with low optimizer-estimated cost for the input workload. Large language models (LLMs) offer a different approach to index tuning, using knowledge they have learned from publicly available training data. However, the effectiveness of LLM-driven index tuning in comparison to today's index advisors, particularly on enterprise workloads, remains unclear. In this paper, we study the practical effectiveness of LLM-driven index tuning on Microsoft SQL Server using both industrial benchmarks and real-world enterprise customer workloads, and compare it with DTA. Our results show that while LLMs in several cases identify configurations that significantly outperform those found by DTA in terms of execution time, they suffer from high variance in index recommendation quality. Furthermore, index recommendations from the LLM are often substantially worse than DTA in terms of optimizer-estimated cost, making it challenging to extend cost-based index advisors such as DTA to leverage LLMs for index tuning. We point to some areas of future work that may be important for robustly leveraging LLMs for index tuning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑