Index structures often materialize one or multiple levels of explicit indirections (aka pointers) to allow for a quick traversal to the data of interest. Unfortunately, dereferencing a pointer to go from one level to the other is costly since additionally to following the address, it involves two address translations from virtual memory to physical memory under the hood. In the worst case, such an address translation is resolved by an index access itself, namely by a lookup into the page table, a central hardware-accelerated index structure of the OS. However, if the page table is anyways constantly queried, it raises the question whether we can actively incorporate it into our database indexes and make it work for us. Precisely, instead of materializing indirections in form of pointers, we propose to express these indirections directly in the page table wherever possible. By introducing such shortcuts, we (a) effectively reduce the height of traversal during lookups and (b) exploit the hardware-acceleration of lookups in the page table. In this work, we analyze the strengths and considerations of this approach and showcase its effectiveness at the case of the real-world indexing scheme extendible hashing.
翻译:索引结构通常会实体化一个或多个显式间接层(即指针),以便快速遍历到目标数据。然而,在层级间通过解引用指针进行跳转代价高昂——因为除了地址追踪本身,这一过程还涉及底层从虚拟内存到物理内存的两次地址转换。在最坏情况下,这种地址转换需要通过索引访问本身来解决,即对页表(操作系统核心的硬件加速索引结构)执行查找操作。既然页表无论如何都会被持续查询,这就引发了一个问题:我们能否主动将其整合到数据库索引中,使其为我们所用?具体而言,我们提出在可行的情况下,不采用指针形式实体化间接层,而是将这些间接层直接表达在页表中。通过引入此类快捷路径,我们能够:(a) 有效减少查找过程中的遍历层级深度,(b) 利用页表查找的硬件加速特性。本研究分析了该方法的优势与考量,并以现实世界的索引方案可扩展哈希为例展示其有效性。