HTAP systems are designed to handle transactional and analytical workloads. Besides a mixed workload at any given time, the workload can also change over time. A popular type of continuously changing workload is one that oscillates between being write-heavy at times and being read-heavy at other times. Oscillating workloads can be observed in many applications. Indexes, e.g., the B+-tree and the LSM-tree, cannot perform equally well all the time. Conventional adaptive indexing does not solve this issue as it focuses on adapting in one direction. This paper studies how to support oscillating workloads with adaptive indexes that adapt the underlying index structures in both directions. With the observation that real-world datasets are skewed, the focus is to optimize the index within the hotspot regions. The Adaptive Hotspot-Aware Tree (or AHA-tree, for short) is introduced, where its adaptation is bi-directional. Experimental evaluation show that AHA-tree can behave competitively as compared to an LSM-tree for write-heavy transactional workloads. Upon switching to a read-heavy analytical workload, AHA-tree can gradually adapt and behave competitively, and can match the B+-tree in read performance.
翻译:HTAP系统旨在同时处理事务型与分析型工作负载。除了任意时刻的混合负载外,工作负载还可能随时间动态变化。一种典型的持续变化负载类型是在写密集型与读密集型之间周期性振荡的工作负载。此类振荡型负载广泛存在于众多应用场景中。传统索引结构(如B+树与LSM树)难以在所有负载条件下均保持最优性能。现有自适应索引方法因仅关注单向调整而无法解决此问题。本文研究如何通过双向自适应调整底层索引结构来支持振荡型工作负载。基于现实数据集存在偏斜分布的观察,研究重点聚焦于热点区域内的索引优化。本文提出自适应热点感知树(简称AHA-tree),其具备双向自适应能力。实验评估表明:在处理写密集型事务负载时,AHA-tree性能可与LSM树相媲美;当切换至读密集型分析负载时,AHA-tree能逐步自适应调整,在读取性能上达到与B+树相当的水平。