Database management system (DBMS) configuration debugging, e.g., diagnosing poorly configured DBMS knobs and generating troubleshooting recommendations, is crucial in optimizing DBMS performance. However, the configuration debugging process is tedious and, sometimes challenging, even for seasoned database administrators (DBAs) with sufficient experience in DBMS configurations and good understandings of the DBMS internals (e.g., MySQL or Oracle). To address this difficulty, we propose Andromeda, a framework that utilizes large language models (LLMs) to enable automatic DBMS configuration debugging. Andromeda serves as a natural surrogate of DBAs to answer a wide range of natural language (NL) questions on DBMS configuration issues, and to generate diagnostic suggestions to fix these issues. Nevertheless, directly prompting LLMs with these professional questions may result in overly generic and often unsatisfying answers. To this end, we propose a retrieval-augmented generation (RAG) strategy that effectively provides matched domain-specific contexts for the question from multiple sources. They come from related historical questions, troubleshooting manuals and DBMS telemetries, which significantly improve the performance of configuration debugging. To support the RAG strategy, we develop a document retrieval mechanism addressing heterogeneous documents and design an effective method for telemetry analysis. Extensive experiments on real-world DBMS configuration debugging datasets show that Andromeda significantly outperforms existing solutions.
翻译:数据库管理系统(DBMS)配置调试,例如诊断配置不当的DBMS参数并生成故障排除建议,对于优化DBMS性能至关重要。然而,配置调试过程繁琐且有时具有挑战性,即使对于在DBMS配置方面拥有丰富经验并对DBMS内部机制(如MySQL或Oracle)有深入理解的资深数据库管理员(DBA)亦是如此。为解决此难题,我们提出了Andromeda框架,该框架利用大语言模型(LLMs)实现自动化的DBMS配置调试。Andromeda作为DBA的自然替代者,能够回答关于DBMS配置问题的广泛自然语言(NL)查询,并生成修复这些问题的诊断建议。然而,直接向LLMs提出这些专业问题可能导致答案过于笼统且往往不尽人意。为此,我们提出了一种检索增强生成(RAG)策略,该策略能有效地从多个来源为问题提供匹配的领域特定上下文。这些上下文来源于相关的历史问题、故障排除手册以及DBMS遥测数据,从而显著提升了配置调试的性能。为支持RAG策略,我们开发了一种处理异构文档的文档检索机制,并设计了一种有效的遥测数据分析方法。在真实世界的DBMS配置调试数据集上进行的大量实验表明,Andromeda显著优于现有解决方案。