Learned indexes fit machine learning (ML) models to the data and use them to make query operations more time and space-efficient. Recent works propose using learned spatial indexes to improve spatial query performance by optimizing the storage layout or internal search structures according to the data distribution. However, only a few learned indexes exploit the query workload distribution to enhance their performance. In addition, building and updating learned spatial indexes are often costly on large datasets due to the inefficiency of (re)training ML models. In this paper, we present WaZI, a learned and workload-aware variant of the Z-index, which jointly optimizes the storage layout and search structures, as a viable solution for the above challenges of spatial indexing. Specifically, we first formulate a cost function to measure the performance of a Z-index on a dataset for a range-query workload. Then, we optimize the Z-index structure by minimizing the cost function through adaptive partitioning and ordering for index construction. Moreover, we design a novel page-skipping mechanism to improve the query performance of WaZI by reducing access to irrelevant data pages. Our extensive experiments show that the WaZI index improves range query time by 40% on average over the baselines while always performing better or comparably to state-of-the-art spatial indexes. Additionally, it also maintains good point query performance. Generally, WaZI provides favorable tradeoffs among query latency, construction time, and index size.
翻译:学习型索引将机器学习模型拟合至数据中,并利用这些模型提升查询操作的时间与空间效率。近期研究提出通过学习型空间索引,根据数据分布优化存储布局或内部搜索结构来改善空间查询性能。然而,仅有少数学习型索引会利用查询工作负载分布来提升其性能。此外,由于机器学习模型(重)训练的低效性,在大型数据集上构建和更新学习型空间索引通常成本高昂。本文提出WaZI——一种Z-索引的学习型变体且具备工作负载感知能力,它联合优化存储布局与搜索结构,作为应对上述空间索引挑战的可行方案。具体而言,我们首先构建一个代价函数来度量Z-索引在给定数据集上针对范围查询工作负载的性能表现。随后,通过自适应分区与排序最小化该代价函数,对Z-索引结构进行优化以完成索引构建。此外,我们设计了一种新颖的页面跳过机制,通过减少对不相关数据页的访问来提升WaZI的查询性能。广泛实验表明,与基线方法相比,WaZI索引平均提升40%的范围查询时间,且始终优于或媲美现有最先进空间索引。同时,它还保持了良好的点查询性能。总体而言,WaZI在查询延迟、构建时间与索引大小之间实现了有利的权衡。