Automated SQL Query Tuning for MPP Database Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Massively Parallel Processing (MPP) database platforms face challenges in optimizing query performance due to poorly performing queries, which are not adequately addressed by current methods, leading to inefficiencies in CPU time, IO operations, memory usage, and data distribution.

Innovation Solution

A method and computer program product that improve SQL query performance by parsing and iteratively building queries, analyzing performance metrics, and applying tuning techniques such as data distribution optimization and partition elimination to enhance resource utilization and reduce data skew.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If manual query performance tuning is performed by database administrators, then query performance can be improved, but the time and resources required for identification and tuning increase significantly

Engineering Contradiction:
Improvequery performanceVSAvoidtime for identifying and tuning queries
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system implements automated query performance tuning that operates without human intervention. The automated tuning engine continuously monitors query performance metrics, identifies poorly performing queries, and applies optimization techniques automatically, eliminating the need for manual DBA intervention while maintaining improved query performance.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system employs continuous monitoring of query performance metrics to provide feedback loops. Performance data is collected, analyzed, and used to automatically adjust and refine query optimization strategies, creating a self-improving system that adapts to changing workloads and data patterns over time.

Inventive Principle:
Principle #23Feedback

2Reliability

If more system resources are allocated to handle poorly performing queries, then query execution can be maintained, but resource utilization efficiency decreases

Engineering Contradiction:
Improvequery executionVSAvoidsystem resource utilization
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system dynamically adjusts query execution parameters and optimization strategies based on real-time performance monitoring. By changing parameters such as join methods, access paths, and resource allocation dynamically, the system maintains reliable query execution while optimizing resource utilization efficiency according to actual workload conditions.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If data distribution is optimized in MPP databases, then query performance improves, but the complexity of data management increases

Engineering Contradiction:
Improvequery performanceVSAvoiddata management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system segments the complex task of data distribution optimization into manageable components. It separately handles query parsing, performance metric extraction, bottleneck identification, and optimization application, allowing each component to be optimized independently while managing overall complexity through modular architecture.

Inventive Principle:
Principle #1Segmentation

4Extent of automation

If automated tuning systems are implemented, then manual intervention is reduced, but the initial setup and system complexity increase

Engineering Contradiction:
Improvequery tuning automationVSAvoidsystem architecture complexity
Core Design Contradiction:
Extent of automationVSDevice complexity

Solution Approach 1:

The automated tuning engine is designed as a universal system that handles multiple query optimization tasks through a single integrated architecture. It can parse various SQL query types, extract different performance metrics, identify multiple types of bottlenecks, and apply diverse optimization techniques, reducing the need for separate specialized systems while maintaining high automation capability.

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

Data Source

PatentUS11657047B1Automated query tuning method, computer program product, and system for MPP database platform
Publication Date: 2023.05.23 SHIVARATHRI GIRI BABU
  • US11657047B1 patent drawing
  • US11657047B1 patent drawing
  • US11657047B1 patent drawing

AI summary

A method if improving the performance of any SQL query in a Massively Parallel Processing (MPP) database platform replicates a query and breaks the query down into its objects so that iterations of the query components may be analyzed for areas affecting performance. The method builds the query from the lowest part of the query (for example, a single database object may be used in the query) and rebuilds the query by iteratively adding more objects along with their related logic (joins, group by clause, select list, etc.). In each iteration, the process analyzes for the underlying causes of lower performance and fixes them.