Query Execution Classifier for Dynamic Engine Selection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

There is no single optimal combination of query engines and runtimes that suits all queries due to varying query characteristics and system configurations, making it difficult to select the best system for query processing.

Innovation Solution

A computer-implemented method generates a classification model by extracting feature vectors from Directed Acyclic Graphs using Cost-Based Optimizers and labels based on execution times, training the model to predict the optimal execution combination for query processing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a single combination of query engine and runtime is selected for all queries, then system configuration is simplified, but query performance cannot be optimized for different query characteristics

Engineering Contradiction:
Improvequery performanceVSAvoidsystem configuration complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system dynamically selects different query engine and runtime combinations based on query characteristics rather than using a fixed configuration. The classifier model adapts the system configuration in real-time according to the specific query being executed, transforming the static system into a dynamic one that optimizes performance for each query type.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

Different parts of the system (query engine and runtime combinations) are assigned to different query types based on their specific strengths. Each query engine-runtime pair is optimized for particular query characteristics, allowing the system to apply the most suitable configuration locally to each query rather than using a uniform configuration everywhere.

Inventive Principle:
Principle #3Local quality

2Productivity

If multiple execution combinations are tested to find the optimal one, then query performance is maximized, but execution time and resource consumption increase

Engineering Contradiction:
Improvequery performanceVSAvoidexecution time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary testing and evaluation of multiple execution combinations during the training phase to build a classifier model. This preliminary action captures the performance characteristics of different query engine-runtime pairs, so that during actual query execution, the model can quickly predict the optimal combination without requiring real-time testing, thus avoiding the time loss that would occur from testing multiple combinations for each query.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of directly testing multiple execution combinations for each query, the system creates a classifier model that copies the knowledge gained from preliminary testing. The model serves as a surrogate that can predict the optimal execution combination based on query characteristics, eliminating the need to actually execute multiple combinations for each query while still achieving performance optimization.

Inventive Principle:
Principle #26Copying

3Adaptability or versatility

If a classification model is trained with multiple execution combinations, then optimal system selection is achieved, but training complexity and computational overhead increase

Engineering Contradiction:
Improvesystem selection capabilityVSAvoidmodel training complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The training process is segmented into distinct phases: extracting features from query execution plans, labeling execution combinations based on actual performance, and training the classifier model separately. This segmentation allows each component to be developed and optimized independently, reducing the overall training complexity while maintaining the ability to handle multiple execution combinations.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11650983B2Selecting an optimal combination of systems for query processing
Publication Date: 2023.05.16 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11650983B2 patent drawing
  • US11650983B2 patent drawing
  • US11650983B2 patent drawing

AI summary

A method is provided for generating a classification model configured to select an optimal execution combination for query processing. The method provides, to a processor, training queries and different execution combinations for executing the training queries. Each different execution combination involves a respective different query engine and a respective different runtime. The method extracts, from a set of Directed Acyclic Graphs (DAGs) using a set of Cost-Based Optimizers (CBOs), a set of feature vectors for each of the plurality of training queries. The method adds, by the processor to each of merged feature vectors a respective label indicative of the optimal execution combination based on actual respective execution times of the plurality of different execution combinations, to obtain a set of labels. The method trains, by the processor, the classification model by learning the set of merged feature vectors with the set of labels.