Bridging machine learning and query optimization: Feedback-driven selectivity estimation for spatial filters
摘要
In query optimization, the precision of selectivity estimates for query predicates is foundational for selecting efficient execution plans. Spatial selectivity estimation, which assesses the count of relevant objects meeting specific spatial criteria, poses a significant challenge due to its multi-dimensional and complex nature. Moreover, it is essential that these estimation methods be both fast and minimize memory usage. In this paper, we leverage optimizer feedback to tackle the challenging task of estimating selectivity for multi-dimensional spatial predicates. We redefine spatial selectivity estimation as a regression problem and investigate the application of three types of machine learning (ML) models: neural networks, tree-based models, and instance-based models to address this challenge. We compare these ML approaches against baseline methods that rely on Minimum Bounding Rectangles (MBRs), encompassing both RTree-based and histogram-based estimations. Through extensive empirical evaluations using a real dataset, our study guides the choice of ML models in accordance with the data collected by the optimizer.