QuickSel: Quick Selectivity Learning with Mixture Models

12/26/2018
by   Yongjoo Park, et al.
0

Estimating the selectivity of a query is a key step in almost any cost-based query optimizer. Most of today's databases rely on histograms or samples that are periodically refreshed by re-scanning the data as the underlying data changes. Since frequent scans are costly, these statistics are often stale and lead to poor selectivity estimates. As an alternative to scans, query-driven histograms have been proposed, which refine the histograms based on the actual selectivities of the observed queries. Unfortunately, these approaches are either too costly to use in practice---i.e., require an exponential number of buckets---or quickly lose their advantage as they observe more queries. For example, the state-of-the-art technique requires 318,936 buckets (and over 8 seconds of refinement overhead per query) after observing only 300 queries. In this paper, we propose a selectivity learning framework, called QuickSel, which falls into the query-driven paradigm but does not use histograms. Instead, it builds an internal model of the underlying data, which can be refined significantly faster (e.g., only 1.9 milliseconds for 300 queries). This fast refinement allows QuickSel to continuously learn from each query and yield increasingly more accurate selectivity estimates over time. Unlike query-driven histograms, QuickSel relies on a mixture model and a new optimization algorithm for training its model. Our extensive experiments on two real-world datasets confirm that, given the same target accuracy, QuickSel is on average 254.6x faster than state-of-the-art query-driven histograms, including ISOMER and STHoles. Further, given the same space budget, QuickSel is on average 57.3 and samples, respectively.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/11/2022

FactorJoin: A New Cardinality Estimation Framework for Join Queries

Cardinality estimation is one of the most fundamental and challenging pr...
research
03/27/2023

Learned Query Superoptimization

Traditional query optimizers are designed to be fast and stateless: each...
research
04/07/2019

Neo: A Learned Query Optimizer

Query optimization is one of the most challenging problems in database s...
research
11/17/2022

SafeBound: A Practical System for Generating Cardinality Bounds

Recent work has reemphasized the importance of cardinality estimates for...
research
01/01/2019

Probery: A Probability-based Incomplete Query Optimization for Big Data

Nowadays, query optimization has been highly concerned in big data manag...
research
04/12/2020

Complaint-driven Training Data Debugging for Query 2.0

As the need for machine learning (ML) increases rapidly across all indus...
research
08/18/2023

Deep Equilibrium Object Detection

Query-based object detectors directly decode image features into object ...

Please sign up or login with your details

Forgot password? Click here to reset