Table of Contents
Fetching ...

SeLeP: Learning Based Semantic Prefetching for Exploratory Database Workloads

Farzaneh Zirak, Farhana Choudhury, Renata Borovica-Gajic

TL;DR

SeLeP introduces a semantic prefetching framework that learns from the data values contained in blocks rather than relying on logical addresses. By encoding blocks with autoencoders, grouping co-accessed blocks into partitions via affinity graphs and Clay-based partitioning, and forecasting partition access with an encoder-decoder ED-LSTM, SeLeP supports both SQL-based and visual exploratory workloads. The approach achieves substantial gains in hit ratio and I/O reduction across diverse workloads, including non-exploratory benchmarks, and remains responsive under workload shifts thanks to adaptive repartitioning and fine-tuning. This semantic, partition-aware prefetching approach offers practical interactivity improvements for exploratory data analytics and large-scale databases alike, with low runtime overhead and compatibility with existing DBMS stacks.

Abstract

Prefetching is a crucial technique employed in traditional databases to enhance interactivity, particularly in the context of data exploitation. Data exploration is a query processing paradigm in which users search for insights buried in the data, often not knowing what exactly they are looking for. Data exploratory tools deal with multiple challenges such as the need for interactivity with no a priori knowledge being present to help with the system tuning. The state-of-the-art prefetchers are specifically designed for navigational workloads only, where the number of possible actions is limited. The prefetchers that work with SQL-based workloads, on the other hand, mainly rely on data logical addresses rather than the data semantics. They fail to predict complex access patterns in cases where the database size is substantial, resulting in an extensive address space, or when there is frequent co-accessing of data. In this paper, we propose SeLeP, a semantic prefetcher that makes prefetching decisions for both types of workloads, based on the encoding of the data values contained inside the accessed blocks. Following the popular path of using machine learning approaches to automatically learn the hidden patterns, we formulate the prefetching task as a time-series forecasting problem and use an encoder-decoder LSTM architecture to learn the data access pattern. Our extensive experiments, across real-life exploratory workloads, demonstrate that SeLeP improves the hit ratio up to 40% and reduces I/O time up to 45% compared to the state-of-the-art, attaining impressive 95% hit ratio and 80% I/O reduction on average.

SeLeP: Learning Based Semantic Prefetching for Exploratory Database Workloads

TL;DR

SeLeP introduces a semantic prefetching framework that learns from the data values contained in blocks rather than relying on logical addresses. By encoding blocks with autoencoders, grouping co-accessed blocks into partitions via affinity graphs and Clay-based partitioning, and forecasting partition access with an encoder-decoder ED-LSTM, SeLeP supports both SQL-based and visual exploratory workloads. The approach achieves substantial gains in hit ratio and I/O reduction across diverse workloads, including non-exploratory benchmarks, and remains responsive under workload shifts thanks to adaptive repartitioning and fine-tuning. This semantic, partition-aware prefetching approach offers practical interactivity improvements for exploratory data analytics and large-scale databases alike, with low runtime overhead and compatibility with existing DBMS stacks.

Abstract

Prefetching is a crucial technique employed in traditional databases to enhance interactivity, particularly in the context of data exploitation. Data exploration is a query processing paradigm in which users search for insights buried in the data, often not knowing what exactly they are looking for. Data exploratory tools deal with multiple challenges such as the need for interactivity with no a priori knowledge being present to help with the system tuning. The state-of-the-art prefetchers are specifically designed for navigational workloads only, where the number of possible actions is limited. The prefetchers that work with SQL-based workloads, on the other hand, mainly rely on data logical addresses rather than the data semantics. They fail to predict complex access patterns in cases where the database size is substantial, resulting in an extensive address space, or when there is frequent co-accessing of data. In this paper, we propose SeLeP, a semantic prefetcher that makes prefetching decisions for both types of workloads, based on the encoding of the data values contained inside the accessed blocks. Following the popular path of using machine learning approaches to automatically learn the hidden patterns, we formulate the prefetching task as a time-series forecasting problem and use an encoder-decoder LSTM architecture to learn the data access pattern. Our extensive experiments, across real-life exploratory workloads, demonstrate that SeLeP improves the hit ratio up to 40% and reduces I/O time up to 45% compared to the state-of-the-art, attaining impressive 95% hit ratio and 80% I/O reduction on average.
Paper Structure (42 sections, 5 equations, 8 figures, 6 tables, 1 algorithm)

This paper contains 42 sections, 5 equations, 8 figures, 6 tables, 1 algorithm.

Figures (8)

  • Figure 1: System architecture of SeLeP representing: (a) the block encoding component generating block vector encodings using autoencoders, (eg-1) a simplified example for block encoding, (b) the block partitioning component clustering the blocks, (c) the semantic learning component predicting the partition access pattern based on semantic relationship of query encodings, as illustrated in (eg-2). After initial training, (b) and (c) continuously perform prefetching.
  • Figure 2: An example of affinity graph modification upon receiving a new query which accesses block $b_{32}^{tb_2}$ for the first time ($l_p$ is set to a very small value to simplify the example)
  • Figure 3: The prediction model encoder-decoder architecture
  • Figure 4: (a) Hit ratio in SQL-based exploratory workloads. The shaded area shows the portion of cache utilized by the workload (pink) and the additional portion consumed by SeLeP prefetcher (light blue). (b) Relative I/O time with $k$=42 for same workloads.
  • Figure 5: (1) Hit ratio in navigational workloads. The pink area represents portion of the 500MB cache, utilized by the workload, and the light blue area is the additional portion consumed by SeLeP, (2) Relative I/O time of SeLeP and ForeCache for the same workloads with $k=36$.
  • ...and 3 more figures

Theorems & Definitions (1)

  • definition 1: Semantic Prefetching