Query Optimizer Cost Calculation Using Table Similarity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing query execution systems face inefficiencies in selecting the most effective access path for data transfer between tables in SQL databases, leading to suboptimal performance due to varying query execution methods and complex conditions.

Innovation Solution

A processor calculates the cost of data transfer based on the similarity between tables, using a cost function to estimate processor usage and identify the most efficient access path by considering factors like table structure, data type, and order, thereby optimizing CPU utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the query optimizer evaluates multiple alternative execution plans using traditional cost formulas, then the query execution correctness is ensured, but the query execution performance is suboptimal due to insufficient consideration of table similarity and data transfer efficiency

Engineering Contradiction:
Improvequery execution performanceVSAvoidaccess path selection complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system pre-calculates and stores similarity metrics between tables before query execution. When a query is executed, the optimizer can directly use these pre-computed similarity values to evaluate access paths, avoiding the need to perform complex similarity analyses during query optimization, thus improving execution performance without proportionally increasing complexity

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces table similarity as an intermediary metric that mediates between the query optimizer and the access path selection process. This similarity metric serves as a bridge that quantifies the relationship between source and target tables, enabling the optimizer to make more informed decisions about data transfer operations without directly evaluating all possible execution plans in detail

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If the system uses traditional cost formulas with I/O and CPU utilization weights, then the evaluation is computationally feasible, but the cost estimation accuracy is insufficient for optimizing data transfer operations between tables

Engineering Contradiction:
Improvecost estimation accuracyVSAvoidprocessor usage
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The system enhances the traditional cost formula by incorporating table similarity as an additional parameter. This parameter change allows the cost estimation to account for the specific characteristics of data transfer between similar tables, improving accuracy without requiring a complete redesign of the cost evaluation framework, thus maintaining computational feasibility

Inventive Principle:
Principle #35Parameter changes

3Reliability

If the query optimizer considers all possible access paths for data retrieval, then the optimal path is guaranteed to be found, but the optimization time increases significantly due to the large number of alternatives

Engineering Contradiction:
Improveoptimal access path selectionVSAvoidoptimization time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system pre-computes and caches table similarity metrics before query optimization. During query execution, the optimizer can quickly retrieve these pre-calculated values and use them to prune the search space of possible access paths, reducing the time required to evaluate alternatives while still ensuring that the optimal path is selected based on accurate similarity-based cost estimates

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9996574B2Enhancements for optimizing query executions
Publication Date: 2018.06.12 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9996574B2 patent drawing
  • US9996574B2 patent drawing
  • US9996574B2 patent drawing

AI summary

In an approach for optimizing query executions a processor receives a request to transfer data from a first table to a second table. A processor detects a relationship between the first table and the second table, wherein the relationship is based on a similarity between the first table and the second table. A processor identifies at least a first access path for transferring the data from the first table to the second table. A processor calculates a first cost of transferring the data from the first table to the second table using the first access path based on the similarity between the first table and the second table, wherein the first cost indicates estimated processor usage to transfer the data.