arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 0811.2904cs.DBcs.DS
收藏

一维二级索引:超越B树和位图索引

Secondary Indexing in One Dimension: Beyond B-trees and Bitmap Indexes

Rasmus Pagh, S. Srinivasa Rao

摘要:

设S是一个有限的有序字母表,且x = x_1x_2.. x_n是S上的弦。x的“二级索引”回答以下形式的字母表范围查询:给定S上的范围[a_l,a_r],返回集合I_{[a_l;a_r]} = {i| x_i \in [a_l; a_r]}。二级索引在关系数据库和科学数据分析中得到大量使用。众所周知,为与每个字符相关联的位置集存储字典的明显解决方案并不总是给出最佳查询时间。在本文中,我们给出了第一个理论上最佳的数据结构的二级索引问题。在I/O模型中,当回答查询时读取的数据量在表示I_{[a_l;a_r]}所需的最小空间的常数因子内,假设内部存储器的大小为(|S| log n)^{delta}个块,对于某个常数delta > 0。在最坏的情况下,数据结构的空间使用是O(n log |S|)比特,并且我们进一步展示了如何根据x的0阶熵来约束数据结构的大小。我们展示了如何支持更新实现各种时空权衡。我们还考虑基本二级索引问题的近似版本,其中查询报告包含不在I_{[a_l;a_r]}中的每个元素的I_{[a_l;a_r]}超集,概率最多为epsilon,其中epsilon > 0是误报概率。对于这个问题,需要由查询算法读取的数据量减少到O(|I_{[a_l;a_r]}| log(1/log))位。

英文摘要:

Let S be a finite, ordered alphabet, and let x = x_1 x_2 ... x_n be a string over S. A "secondary index" for x answers alphabet range queries of the form: Given a range [a_l,a_r] over S, return the set I_{[a_l;a_r]} = {i |x_i \in [a_l; a_r]}. Secondary indexes are heavily used in relational databases and scientific data analysis. It is well-known that the obvious solution, storing a dictionary for the position set associated with each character, does not always give optimal query time. In this paper we give the first theoretically optimal data structure for the secondary indexing problem. In the I/O model, the amount of data read when answering a query is within a constant factor of the minimum space needed to represent I_{[a_l;a_r]}, assuming that the size of internal memory is (|S| log n)^{delta} blocks, for some constant delta > 0. The space usage of the data structure is O(n log |S|) bits in the worst case, and we further show how to bound the size of the data structure in terms of the 0-th order entropy of x. We show how to support updates achieving various time-space trade-offs. We also consider an approximate version of the basic secondary indexing problem where a query reports a superset of I_{[a_l;a_r]} containing each element not in I_{[a_l;a_r]} with probability at most epsilon, where epsilon > 0 is the false positive probability. For this problem the amount of data that needs to be read by the query algorithm is reduced to O(|I_{[a_l;a_r]}| log(1/epsilon)) bits.

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

↑