Database Query Sub-Plan Reuse for Concurrent Throughput

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large-scale concurrent query methods require regenerating the entire integrated execution plan whenever a query changes, leading to prolonged query response times and reduced efficiency due to wasted time generating static execution plans that cannot be split.

Innovation Solution

A query method and device that determine execution plans for multiple queries, identify and reuse common sub-plans, and allocate shared resources in a data cache to reduce repeated calculations and improve throughput.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Use of energy by moving object

If multiple queries are compiled together into an integrated execution plan, then resource utilization is improved, but query response time increases when queries change

Engineering Contradiction:
Improveresource utilizationVSAvoidquery response time
Core Design Contradiction:
Use of energy by moving objectVSLoss of time

Solution Approach 1:

The patent segments the integrated execution plan into multiple independent sub-plans, each corresponding to a specific query. This allows individual sub-plans to be executed independently without regenerating the entire plan when queries change, thus reducing query response time while maintaining resource utilization benefits of batch processing

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces dynamic query result output mechanisms where queries can output results at different times rather than all at once. The execution plan structure is made flexible to accommodate dynamic query completion and result output, allowing the system to adapt to changing query requirements without full plan regeneration

Inventive Principle:
Principle #15Dynamics

2Productivity

If an integrated execution plan is generated for all queries, then execution efficiency is improved, but adaptability to query changes deteriorates

Engineering Contradiction:
Improveexecution efficiencyVSAvoidadaptability to query changes
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The execution plan is divided into independent sub-plans that can be individually modified when queries change. Each sub-plan maintains the efficiency of compiled execution while allowing selective updates without regenerating the entire plan, thus preserving both execution efficiency and adaptability

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates a universal execution plan structure that can handle multiple queries with different requirements. The plan framework is designed to be multi-functional, accommodating various query types and changes while maintaining overall execution efficiency through a unified planning approach

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

3Reliability

If the entire integrated execution plan is regenerated when a query changes, then query accuracy is maintained, but time consumption increases

Engineering Contradiction:
Improvequery accuracyVSAvoidtime consumption
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

By segmenting the execution plan into sub-plans, the system can regenerate only the affected sub-plan when a query changes rather than the entire plan. This maintains query accuracy for changed queries while avoiding unnecessary regeneration of unchanged sub-plans, significantly reducing time consumption

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary compilation of the overall execution plan structure in advance, identifying sub-plans and their dependencies. This preliminary action enables quick identification of which sub-plans need regeneration when queries change, maintaining accuracy while minimizing regeneration time

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11169994B2Query method and query device
Publication Date: 2021.11.09 HUAWEI TECH CO LTD
  • US11169994B2 patent drawing
  • US11169994B2 patent drawing
  • US11169994B2 patent drawing

AI summary

A query method and a query device, where the method includes determining N execution plans respectively corresponding to N query requests according to the received N query requests, determining at least two same first sub-plans, generating a first sub-query result corresponding to any one of the at least two same first sub-plans, and in a process of generating, according to the N query requests, a query result corresponding to each of the N query requests, the same first sub-query result corresponding to any one of the first sub-plans is used for all the same first sub-plans. Hence, a large amount of repeated calculation can be reduced, database system resources are reduced, and query efficiency and a throughput of a database system in a large-scale concurrent query application scenario are improved.