arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1906.02560cs.DB
收藏

一种基于学习的端到端成本估算方法

An End-to-End Learning-based Cost Estimator

Ji Sun, Guoliang Li

摘要:

开销和基数估计对于查询优化器至关重要,它可以指导计划的选择。然而,传统的经验成本和基数估计技术不能提供高质量的估计,因为它们不能捕获多个列之间的相关性。近年来数据库界的研究表明,基于学习的基数估计方法优于经验方法。然而,现有的基于学习的方法有一些局限性。首先,它们只能估计基数,但不能估计成本。其次,具有平均池化的卷积神经网络(CNN)难以表示复杂的结构,例如,谓词复杂,模型难以推广。为了解决这些挑战,我们提出了一个有效的基于端到端学习的成本估计框架,该框架基于树结构模型,可以同时估计成本和基数。据我们所知,这是第一个基于深度学习的端到端成本估算器。我们提出了有效的特征提取和编码技术,它考虑了查询和物理操作的特征提取。我们将这些特征嵌入到树结构模型中。我们提出了一种有效的方法来编码字符串值,这可以提高谓词匹配的泛化能力。由于枚举所有字符串值的代价太高,我们设计了一种基于模式的方法,该方法选择模式来覆盖字符串值,并利用模式来嵌入字符串值。我们在真实世界的数据集上进行了实验,实验结果表明,我们的方法优于基线。

英文摘要:

Cost and cardinality estimation is vital to query optimizer, which can guide the plan selection. However traditional empirical cost and cardinality estimation techniques cannot provide high-quality estimation, because they cannot capture the correlation between multiple columns. Recently the database community shows that the learning-based cardinality estimation is better than the empirical methods. However, existing learning-based methods have several limitations. Firstly, they can only estimate the cardinality, but cannot estimate the cost. Secondly, convolutional neural network (CNN) with average pooling is hard to represent complicated structures, e.g., complex predicates, and the model is hard to be generalized. To address these challenges, we propose an effective end-to-end learning-based cost estimation framework based on a tree-structured model, which can estimate both cost and cardinality simultaneously. To the best of our knowledge, this is the first end-to-end cost estimator based on deep learning. We propose effective feature extraction and encoding techniques, which consider both queries and physical operations in feature extraction. We embed these features into our tree-structured model. We propose an effective method to encode string values, which can improve the generalization ability for predicate matching. As it is prohibitively expensive to enumerate all string values, we design a patten-based method, which selects patterns to cover string values and utilizes the patterns to embed string values. We conducted experiments on real-world datasets and experimental results showed that our method outperformed baselines.

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

↑