Online Sketch-based Query Optimization

02/04/2021
by   Yesdaulet Izenov, et al.
0

Cost-based query optimization remains a critical task in relational databases even after decades of research and industrial development. Query optimizers rely on a large range of statistical synopses – including attribute-level histograms and table-level samples – for accurate cardinality estimation. As the complexity of selection predicates and the number of join predicates increase, two problems arise. First, statistics cannot be incrementally composed to effectively estimate the cost of the sub-plans generated in plan enumeration. Second, small errors are propagated exponentially through join operators, which can lead to severely sub-optimal plans. In this paper, we introduce COMPASS, a novel query optimization paradigm for in-memory databases based on a single type of statistics – Fast-AGMS sketches. In COMPASS, query optimization and execution are intertwined. Selection predicates and sketch updates are pushed-down and evaluated online during query optimization. This allows Fast-AGMS sketches to be computed only over the relevant tuples – which enhances cardinality estimation accuracy. Plan enumeration is performed over the query join graph by incrementally composing attribute-level sketches – not by building a separate sketch for every sub-plan. We prototype COMPASS in MapD – an open-source parallel database – and perform extensive experiments over the complete JOB benchmark. The results prove that COMPASS generates better execution plans – both in terms of cardinality and runtime – compared to four other database systems. Overall, COMPASS achieves a speedup ranging from 1.35X to 11.28X in cumulative query execution time over the considered competitors.

READ FULL TEXT

page 17

page 19

page 24

research
01/06/2019

Exact Selectivity Computation for Modern In-Memory Database Query Optimization

Selectivity estimation remains a critical task in query optimization eve...
research
10/30/2021

Simpli-Squared: A Very Simple Yet Unexpectedly Powerful Join Ordering Algorithm Without Cardinality Estimates

The Join Order Benchmark (JOB) has become the de facto standard to asses...
research
06/01/2023

Finding Performance Issues in Database Engines via Cardinality Estimation Testing

Database Management Systems (DBMSs) process a given query by creating an...
research
10/01/2020

Revisiting Runtime Dynamic Optimization for Join Queries in Big Data Management Systems

Query Optimization remains an open problem for Big Data Management Syste...
research
08/22/2019

The Case for Deep Query Optimisation

Query Optimisation (QO) is the most important optimisation problem in da...
research
06/21/2018

Novel Selectivity Estimation Strategy for Modern DBMS

Selectivity estimation is important in query optimization, however accur...
research
07/14/2019

An Approach Based on Bayesian Networks for Query Selectivity Estimation

The efficiency of a query execution plan depends on the accuracy of the ...

Please sign up or login with your details

Forgot password? Click here to reset