Database Object Validation for Query Plan Reuse

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database management systems face challenges in determining the reusability of query plans due to changes in metadata, leading to potential performance regression, as existing methods may incorrectly invalidate query plans even when the logical structure remains unchanged.

Innovation Solution

An improved object validation method that assesses the reusability of query plans by comparing the logical structures of objects involved in the query with their captured versions, stored in object definition and mapping tables, to determine if the query plans can be safely reused despite changes in object identifiers and versions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If query plans are reused to improve performance, then query execution speed is improved, but query plan stability deteriorates when object metadata changes

Engineering Contradiction:
Improvequery execution speedVSAvoidquery plan stability
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent changes the validation parameter from metadata-based (OID, VID) to logical structure-based comparison. By comparing the actual logical structure of objects rather than their identifiers, the system can detect when objects are semantically equivalent despite metadata changes, enabling safe query plan reuse while maintaining stability.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent replaces the mechanical metadata comparison system with a logical structure interpretation system. Instead of directly comparing object identifiers and versions, the system translates objects into their logical structures and compares those representations, providing a more robust validation mechanism that ignores superficial metadata changes.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If query plans are invalidated when object metadata changes, then query plan stability is maintained, but productivity decreases due to unnecessary plan regeneration

Engineering Contradiction:
Improvequery plan stabilityVSAvoidquery plan regeneration efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent changes the validation criterion from strict metadata equality to logical structure equivalence. This allows query plans to be reused when objects have the same logical structure even if their metadata (OID, VID) has changed, preventing unnecessary plan regencation and improving productivity while maintaining stability.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent performs preliminary validation of object logical structures before allowing query plan reuse. By pre-computing and storing the logical structure representations of objects in the query plan cache, the system can quickly validate whether a captured plan is still valid without regenerating it, thus improving efficiency.

Inventive Principle:
Principle #10Preliminary action

3Device complexity

If metadata-based validation is used to determine query plan reusability, then implementation simplicity is maintained, but measurement precision of object structural changes deteriorates

Engineering Contradiction:
Improvevalidation implementation complexityVSAvoidobject structural change detection accuracy
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent substitutes the simple metadata comparison mechanism with a logical structure interpretation mechanism. By translating objects into their logical structures and comparing those, the system achieves precise detection of actual structural changes while maintaining reasonable implementation complexity through systematic translation and comparison procedures.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent introduces logical structure representation as an intermediary between objects and validation decisions. Instead of directly comparing metadata or object identities, the system compares the logical structure intermediaries that represent objects' actual structure, providing precise change detection while keeping the validation process manageable.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11907217B2Database object validation for reusing captured query plans
Publication Date: 2024.02.20 SAP SE
  • US11907217B2 patent drawing
  • US11907217B2 patent drawing
  • US11907217B2 patent drawing

AI summary

A computer implemented method can receive a request for a fallback query execution plan of a query in a database system. The query involves an object of the database system. The object is associated with a captured object. The method can evaluate whether the object and the captured object have the same logical structure. Responsive to an indication that the object and the captured object have the same logical structure, the method can reuse the fallback query execution plan to execute the query. The evaluating includes identifying a logical structure of the captured object stored in an object definition table, obtaining a current logical structure of the object, and comparing the logical structure of the captured object with the current logical structure of the object.