arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2002.01164cs.DBcs.DS
收藏

用位置序列模式估计SQL LIKE的选择性

Using Positional Sequence Patterns to Estimate the Selectivity of SQL LIKE Queries

Mehmet Aytimur, Ali Cakmak

摘要:

随着基于文本的数据量的急剧增加,这些数据通常包含拼写错误和其他错误,使用灵活的搜索模式查询这些数据变得越来越普遍。关系数据库支持LIKE运算符以允许用特定的LIKE谓词(例如,LIKE 'Sub %',匹配所有以'Sub'开头的字符串)。由于文本数据的大小很大,以最佳方式执行此类查询对于数据库性能非常关键。在为LIKE查询构建最有效的执行计划时,查询优化器需要对灵活的基于模式的查询谓词进行选择性估计。最近,SPH算法提出了一种基于序列模式的直方图结构来估计LIKE查询的选择性。SPH方法的一个缺点是它经常高估查询的选择性。为了缓解高估问题,在本文中,我们提出了一种新的序列模式类型,称为位置序列模式。所提出的模式之间的序列项目对,出现在所有的模式出现彼此相邻的那些可能有其他项目之间的区别。此外,在直方图构建过程中,我们采用了基于模式信息量的冗余模式消除。最后,我们提出了一个基于分区的匹配方案在选择性估计。在DBLP数据集上的实验结果表明,该方法在出错率方面比现有方法提高了20%左右。

英文摘要:

With the dramatic increase in the amount of the text-based data which commonly contains misspellings and other errors, querying such data with flexible search patterns becomes more and more commonplace. Relational databases support the LIKE operator to allow searching with a particular wildcard predicate (e.g., LIKE 'Sub%', which matches all strings starting with 'Sub'). Due to the large size of text data, executing such queries in the most optimal way is quite critical for database performance. While building the most efficient execution plan for a LIKE query, the query optimizer requires the selectivity estimate for the flexible pattern-based query predicate. Recently, SPH algorithm is proposed which employs a sequence pattern-based histogram structure to estimate the selectivity of LIKE queries. A drawback of the SPH approach is that it often overestimates the selectivity of queries. In order to alleviate the overestimation problem, in this paper, we propose a novel sequence pattern type, called positional sequence patterns. The proposed patterns differentiate between sequence item pairs that appear next to each other in all pattern occurrences from those that may have other items between them. Besides, we employ redundant pattern elimination based on pattern information content during histogram construction. Finally, we propose a partitioning-based matching scheme during the selectivity estimation. The experimental results on a real dataset from DBLP show that the proposed approach outperforms the state of the art by around 20% improvement in error rates.

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

↑