Database Optimizer Plan Validation via Test Case Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Optimizer programs in relational databases face performance degradation due to changes in join strategies and costing algorithms following software releases or fixes, leading to inefficient data retrieval and resource consumption.

Innovation Solution

A method and system to assess optimizer performance by executing test cases to derive pre- and post-variation plans, varying strategies such as costing algorithms or join methods, and analyzing outputs to measure performance impacts, using graphical representations to visualize changes in join strategies and geographies.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If optimizer strategies (join strategies, costing algorithms) are changed following software releases or fixes, then the optimizer may achieve better performance in some scenarios, but performance degradation occurs in other applications

Engineering Contradiction:
Improvequery execution speedVSAvoidoptimizer performance consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by executing test cases before deploying optimizer changes to production. The validation framework runs queries against test databases with varied data characteristics (different sizes, distributions, and patterns) to predict performance outcomes before the optimizer changes are activated, allowing potential performance degradation to be detected and addressed in advance.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback by measuring actual query execution performance across multiple test cases and using these results to validate whether optimizer changes achieve their intended improvements. The system provides feedback on which data characteristics lead to performance improvements versus degradation, enabling iterative refinement of optimizer strategies and informing decisions about which changes to deploy in production environments.

Inventive Principle:
Principle #23Feedback

2Reliability

If comprehensive test cases are run to validate optimizer changes across all possible scenarios, then performance regressions can be detected, but the validation process becomes time-consuming and resource-intensive

Engineering Contradiction:
Improveperformance validation accuracyVSAvoidvalidation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies segmentation by dividing the validation process into distinct components: multiple independent test cases, each targeting specific data characteristics (different table sizes, query patterns, data distributions). This segmentation allows the validation framework to efficiently execute targeted tests rather than requiring exhaustive testing of all possible scenarios, reducing overall validation time while maintaining comprehensive coverage of critical performance aspects.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent employs partial action by selecting and executing a representative subset of test cases that cover the most critical and common data characteristics and query patterns. Rather than running every possible test scenario, the framework focuses on a curated set of tests that provide sufficient validation confidence with minimized resource consumption and execution time, accepting that not every edge case needs to be tested in detail.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS7870123B2Database optimizer plan validation and characterizations
Publication Date: 2011.01.11 TERADATA US INC
  • US7870123B2 patent drawing
  • US7870123B2 patent drawing
  • US7870123B2 patent drawing

AI summary

The invention relates to a method of determining the performance of an optimizer program arranged to generate a plan. The method generally comprises the steps of executing the optimizer utilising at least one test case to derive a pre-variation plan; executing the pre-variation plan to generate a first output; varying a strategy of the optimizer program; executing the varied optimizer program utilising the at least one test case to derive a post-variation plan; and executing the post-variation plan to generate a second output. The outputs are then grouped according to at least one element of the plans to assess the performance of the optimizer.