Database Access Execution Plan Selection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database access methods are inefficient due to time-consuming execution plan formulation processes, often requiring cumbersome statistics calculations and sampling, leading to prolonged user access times. Existing solutions either reuse execution plans for similar access requests or generate multiple plans based on varying parameters, impacting database access efficiency and accuracy.

Innovation Solution

A method and apparatus that receive a database access statement, parse it to determine user parameters, group objects by similarity, and select a pre-stored execution plan from a plan cache based on the statement type, reducing the number of execution plans and improving access efficiency and accuracy by aggregating objects with similar patterns.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If execution plans are formulated individually for each access request, then access accuracy is improved, but access time increases excessively

Engineering Contradiction:
Improveaccess accuracyVSAvoidaccess time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent pre-calculates and stores execution plans for different parameter ranges before actual access requests are made. When an access request arrives, the system directly retrieves the pre-prepared execution plan matching the request's parameters, avoiding time-consuming real-time calculations while maintaining accurate plan selection

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system performs preliminary grouping of database objects based on their parameters and pre-generates execution plans for each group. This advance preparation allows the system to quickly match incoming requests with appropriate pre-computed plans, resolving the contradiction between accuracy and speed

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If execution plans are reused for similar access requests, then access time is reduced, but access accuracy deteriorates

Engineering Contradiction:
Improveaccess timeVSAvoidaccess accuracy
Core Design Contradiction:
Loss of timeVSMeasurement precision

Solution Approach 1:

The patent segments the parameter space into distinct ranges and creates separate execution plans for each segment. When an access request arrives, the system identifies which segment the request's parameters fall into and retrieves the corresponding specialized execution plan, ensuring both speed through reuse and accuracy through parameter-specific optimization

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different execution plans are created for different parameter ranges, with each plan optimized for its specific local conditions. This allows the system to reuse plans efficiently within each parameter segment while maintaining accuracy by selecting the plan that best matches the actual request parameters

Inventive Principle:
Principle #3Local quality

3Measurement precision

If multiple execution plans are formulated based on different parameters, then access accuracy is improved, but system complexity increases

Engineering Contradiction:
Improveaccess accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges database objects with similar parameters into groups and creates a single execution plan for each group. This consolidation reduces the total number of execution plans needed while maintaining accuracy by ensuring that objects with similar characteristics share the same optimized plan, thereby simplifying the system

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

Execution plans are designed to be universal for groups of objects sharing common parameter characteristics. A single execution plan serves multiple objects within its parameter range, reducing system complexity by eliminating redundant plans while preserving accuracy through parameter-based grouping

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

Data Source

PatentEP3929763B1Database access methods and apparatuses
Publication Date: 2024.01.17 BEIJING OCEANBASE TECHNOLOGY CO LTD
  • EP3929763B1 patent drawingFigure 1
  • EP3929763B1 patent drawingFigure 2
  • EP3929763B1 patent drawingFigure 3~4

AI summary

Implementations of the present specification provide database access methods and apparatuses. The database access method includes the following: receiving a database access statement; parsing the database access statement to determine a target user parameter included in the database access statement; determining a statement type of the database access statement; obtaining a pre-stored execution plan group corresponding to the database access statement of the statement type; selecting a target execution plan from the obtained execution plan group based on the target user parameter; and executing the target execution plan.