Proceedings of the ACM on Management of Data · 2023 · 10 citations · 29 references
ComputingComputer EngineeringComputer ScienceAlgorithmsData StructuresDatabasesQuery ManagementQuery OptimizationQuery ProcessingStructured Query LanguageAdaptive Query OptimizationCardinality EstimationExecution Time AnalysisJoin OrderingOptimization AlgorithmsRuntime Query ReoptimizationSubquery OptimizationSubquery Processing
Query re-optimization is an adaptive query processing technique that re-invokes the optimizer at certain points in query execution. The goal is to dynamically correct the cardinality estimation errors using the statistics collected at runtime to adjust the query plan to improve the overall performance. We identify a key weakness in existing re-optimization algorithms: their subquery division and re-optimization trigger strategies rely heavily on the optimizer's initial plan, which can be far away from optimal. We, therefore, propose QuerySplit, a novel re-optimization algorithm that skips the potentially misleading global plan and instead generates subqueries directly from the logical plan as the basic re-optimization units. By developing a cost function that prioritizes the execution of less "damaging" subqueries, QuerySplit successfully postpones (sometimes avoids) the execution of complex large joins to maximize their probability of having smaller input sizes. We implemented QuerySplit in PostgreSQL and compared our solution against four state-of-the-art re-optimization algorithms using the Join Order Benchmark. Our experiments show that QuerySplit reduces the benchmark execution time by 35% compared to the second-best alternative. The performance gap between QuerySplit and an optimal optimizer is within 4%.
29
How good are query optimizers, really?
Viktor Leis, Andrey Gubichev, Atanas Mirchev et al. · Proceedings of the VLDB Endowment · 2015 · 673 citations · Full text
An overview of query optimization in relational systems
Surajit Chaudhuri · 1998 · 619 citations · Full text
Ron Avnur, Joseph M. Hellerstein · 2000 · 371 citations · Full text
Ryan Marcus, Parimarjan Negi, Hongzi Mao et al. · Proceedings of the VLDB Endowment · 2019 · 339 citations · Full text