Modular Query Optimizer for Distributed Database Join Orders

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current query optimizers in database management systems face challenges in efficiently optimizing queries with mixed join types and data distribution strategies, particularly in distributed databases, leading to suboptimal execution plans and increased processing times.

Innovation Solution

A modular query optimizer that selects optimal join orders by classifying and ranking joins based on physical properties and data distribution, using a projection set generator, join classifier, and cost predictor to determine the lowest cost execution plan, capable of handling arbitrary mixtures of inner and outer joins in column-oriented, row-oriented, and hybrid databases.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional query optimizers are used to determine efficient query execution plans, then query execution can be performed, but the optimizers fail to efficiently handle mixed join types and data distribution strategies in distributed databases, leading to suboptimal execution plans and increased processing times

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidprocessing time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The query optimizer is divided into modular components: a projection set generator that handles projection selection, a join order generator that determines join sequences, and a cost predictor that estimates execution costs. This segmentation allows each module to specialize in specific aspects of query optimization, improving overall efficiency in handling distributed database queries with mixed join types.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The optimizer dynamically adapts to different data distribution strategies and join types by using a configurable cost model that can adjust its behavior based on the specific query characteristics and database configuration. The system can switch between different optimization strategies depending on whether the query involves inner joins, outer joins, or specific data distribution patterns.

Inventive Principle:
Principle #15Dynamics

2Reliability

If the query optimizer evaluates all possible join orders to find the optimal execution plan, then the best plan can be found, but the search space becomes excessively large, especially with unreliable cost models

Engineering Contradiction:
Improveexecution plan qualityVSAvoidsearch space size
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Instead of evaluating all possible join orders, the optimizer uses heuristics to identify and evaluate only the most promising candidate plans. The cost predictor with configurable parameters estimates costs for a limited set of candidate join orders, selecting the best among them without exhaustively searching the entire space, thus balancing plan quality with computational feasibility.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

A configurable cost model acts as an intermediary between the join order generator and the final plan selection. This cost model provides estimated costs for candidate plans without requiring exhaustive evaluation, enabling the system to make informed decisions about which join orders to pursue while filtering out clearly suboptimal options.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If the optimizer considers all types of joins and data distribution strategies, then comprehensive optimization is achieved, but the complexity of handling arbitrary mixtures of inner and outer joins increases

Engineering Contradiction:
Improvejoin type handling capabilityVSAvoidoptimizer structure complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The join order generator is designed as a universal component that can handle multiple join types (inner joins, outer joins, semi-joins) and data distribution strategies through a unified framework. The configurable cost model provides a consistent mechanism for evaluating different join orders regardless of the specific join types involved, simplifying the overall structure while maintaining versatility.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8312027B2Modular query optimizer
Publication Date: 2012.11.13 ROCKET SOFTWARE
  • US8312027B2 patent drawing
  • US8312027B2 patent drawing
  • US8312027B2 patent drawing

AI summary

Computer programs encoded on a computer storage medium provide for a modular query optimizer. In one aspect, a computer program product includes selecting one or more projections from a set of projections for each table in a database query wherein each of the selected projections for the table has leads to an estimated lower execution cost for the query as compared to non-selected projections; generating join orders for the query based on data distribution of one or more of the selected projections among sites in a computer network wherein the join orders reflect different combinations of data distribution operations applied to the output of one or more of the query's joins; and selecting a join order from the join orders based on evaluation of the join orders using a cost model.