Database Query Optimizer Tuning via Tolerance Fingerprints

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database query optimizers may not always select the most efficient query plan for execution, especially in dynamic and automatically generated query statements, leading to suboptimal performance in terms of memory allocation and processing time.

Innovation Solution

Implementing a system where a tolerance level and specific query statement are used to generate fingerprints, allowing the optimizer to apply tuning parameters to future query statements through fingerprint matching, enabling efficient query plan selection by experienced users.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a query optimizer automatically selects query plans without user input, then the system operates with high automation, but the query execution performance may be suboptimal due to inability to apply expert tuning knowledge

Engineering Contradiction:
Improvequery execution performanceVSAvoidquery plan selection automation
Core Design Contradiction:
ProductivityVSExtent of automation

Solution Approach 1:

The system allows experienced users to self-service by providing tuning parameters and tolerance levels that the optimizer then applies automatically. The optimizer serves itself by learning from user-provided examples and applying those tuning parameters to similar future queries without requiring direct user intervention for each query.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system incorporates feedback mechanisms where user-provided tuning parameters and tolerance levels are used to generate fingerprints that guide future query optimizations. The optimizer learns from the feedback of user expertise and continuously improves its query plan selection based on this accumulated knowledge.

Inventive Principle:
Principle #23Feedback

2Measurement precision

If the optimizer applies strict fingerprint matching with zero tolerance, then the precision of query statement matching is high, but the adaptability to dynamically generated query variations is reduced

Engineering Contradiction:
Improvequery statement matching precisionVSAvoidadaptability to query variations
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The system dynamically adjusts the matching criteria by incorporating tolerance levels that allow for variations in query statements. The fingerprint generation process is dynamic, accommodating different levels of query statement variations while maintaining meaningful matching capabilities.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of tolerance level to balance between matching precision and adaptability. By adjusting the tolerance level parameter, the system can adapt to different query statement variations while maintaining the ability to apply appropriate tuning parameters based on the degree of similarity.

Inventive Principle:
Principle #35Parameter changes

3Manufacturing precision

If the system processes each query statement individually without generalization, then the manufacturing precision of query optimization is high, but the productivity decreases due to repeated analysis of similar queries

Engineering Contradiction:
Improvequery optimization precisionVSAvoidquery processing throughput
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The system creates copies of tuning parameters and their associated fingerprints from user-provided examples. Instead of re-analyzing similar queries individually, the optimizer copies the learned tuning parameters and applies them to matching queries, significantly improving throughput while maintaining optimization quality.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The system performs preliminary action by pre-processing user-provided query examples to generate fingerprints and extract tuning parameters in advance. This preliminary analysis allows the optimizer to quickly match future queries against the pre-processed knowledge base without repeating the full analysis process.

Inventive Principle:
Principle #10Preliminary action

4Adaptability or versatility

If the system implements tolerance level-based fingerprint generation, then the adaptability to query variations is improved, but the device complexity increases due to additional processing steps

Engineering Contradiction:
Improvehandling of query variationsVSAvoidfingerprint generation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The fingerprint generation process is segmented into distinct steps: normalizing the query statement, generating the fingerprint based on the normalized statement and tolerance level, and then matching against stored fingerprints. This segmentation makes the complex process more manageable and efficient.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The tolerance level acts as an intermediary parameter that mediates between the query statement and the fingerprint generation process. It provides a controlled interface for handling query variations without requiring complex processing logic throughout the entire system.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11256694B2Tolerance level-based tuning of query processing
Publication Date: 2022.02.22 HEWLETT PACKARD ENTERPRISE DEV LP
  • US11256694B2 patent drawing
  • US11256694B2 patent drawing
  • US11256694B2 patent drawing

AI summary

An input is accessed representing a tuning parameter for a first query statement and a tolerance level. The tolerance level represents a degree of acceptable discrepancy between the first query statement and another query statement. A first fingerprint is generated for the first query statement based on a content of the first query statement and the tolerance level; and the first fingerprint and the tuning parameter are stored. The first fingerprint is used as an index for an optimizer to associate the tuning parameter with a second query statement that corresponds to the first fingerprint.