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

将领域知识添加到查询驱动的学习型数据库中

Adding Domain Knowledge to Query-Driven Learned Databases

Peizhi Wu, Ryan Marcus, Zachary G. Ives

AI总结:

本文针对查询驱动学习型基数估计器依赖大量标注查询且分布外错误严重的问题,提出基于约束的半监督学习方法,将传统优化器的领域知识融入学习型查询优化,从而提升基数估计准确性、减少标注依赖并增强端到端性能鲁棒性。

摘要:

近年来,学习型基数估计已成为传统查询优化方法的一种替代方案:通过在观测到的查询性能上训练机器学习模型,学习型基数估计技术能够准确预测查询的基数和代价——考虑到数据倾斜、相关谓词以及传统方法难以捕捉的许多其他因素。然而,查询驱动的学习型基数估计器依赖于样本工作负载,需要大量带标签的查询。此外,我们表明,最先进的查询驱动技术在面对超出其训练集分布的查询时,可能会产生显著且不可预测的错误。我们证明,这些分布外错误可以通过融入传统查询优化器中使用的领域知识来缓解:即关于值和基数的约束(例如,基于键-外键关系、范围谓词,以及更一般地基于包含依赖和函数依赖)。我们开发了基于约束的半监督查询驱动学习型查询优化方法,并通过实验证明,此类技术可以提高学习型查询优化器在基数估计方面的准确性,减少对大规模带标签查询的依赖,并提高查询端到端性能的鲁棒性。

英文摘要:

In recent years, \emph{learned cardinality estimation} has emerged as an alternative to traditional query optimization methods: by training machine learning models over observed query performance, learned cardinality estimation techniques can accurately predict query cardinalities and costs -- accounting for skew, correlated predicates, and many other factors that traditional methods struggle to capture. However, query-driven learned cardinality estimators are dependent on sample workloads, requiring vast amounts of labeled queries. Further, we show that state-of-the-art query-driven techniques can make significant and unpredictable errors on queries that are outside the distribution of their training set. We show that these out-of-distribution errors can be mitigated by incorporating the \emph{domain knowledge} used in traditional query optimizers: \emph{constraints} on values and cardinalities (e.g., based on key-foreign-key relationships, range predicates, and more generally on inclusion and functional dependencies). We develop methods for \emph{semi-supervised} query-driven learned query optimization, based on constraints, and we experimentally demonstrate that such techniques can increase a learned query optimizer's accuracy in cardinality estimation, reduce the reliance on massive labeled queries, and improve the robustness of query end-to-end performance.

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

↑