In recent years, there has been a notable rise in the application of machine learning to cost estimation for query optimization. Central to an effective cost model are the abilities of accuracy, efficiency, lightness, and generalizability. However, traditional cost models are based on heuristics thus lack of accuracy. On the other hand, the learned cost models frequently struggle to strike a balance between accuracy and efficiency, with many lacking broad applicability. To combat these challenges, we introduce FAITH, a fast, accurate, and database-agnostic learned cost model. FAITH harnesses data from multiple sources to learn cross-database meta-knowledge. It is then effectively refined, leveraging the unique data information from the target database via an Adapter we developed. Proven through various benchmarks, FAITH consistently showcases its prowess in delivering accurate and robust cost estimations.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

FAITH: A Fast, Accurate, and Lightweight Database-Agnostic Learned Cost Model

  • Waner Li,
  • Xu Chen,
  • Zibo Liang,
  • Runfan Ye,
  • Ruyi Lai,
  • Siying Yue,
  • Qinyuan Su,
  • Kai Zheng,
  • Han Su,
  • Shaozhi Wu

摘要

In recent years, there has been a notable rise in the application of machine learning to cost estimation for query optimization. Central to an effective cost model are the abilities of accuracy, efficiency, lightness, and generalizability. However, traditional cost models are based on heuristics thus lack of accuracy. On the other hand, the learned cost models frequently struggle to strike a balance between accuracy and efficiency, with many lacking broad applicability. To combat these challenges, we introduce FAITH, a fast, accurate, and database-agnostic learned cost model. FAITH harnesses data from multiple sources to learn cross-database meta-knowledge. It is then effectively refined, leveraging the unique data information from the target database via an Adapter we developed. Proven through various benchmarks, FAITH consistently showcases its prowess in delivering accurate and robust cost estimations.