Distributed Query Cost Updating for Accurate Execution Plans

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed databases, determining an appropriate execution plan from multiple options is challenging due to varying performance states of data nodes and network costs, leading to inaccurate cost estimation and optimization.

Innovation Solution

A data query optimization method that updates execution costs of candidate plans using monitoring data from data nodes, including processor usage rate, network status, and task planning, to accurately determine a final execution plan.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional cost estimation methods are used for execution plans, then the estimation process is simple and fast, but the accuracy of cost estimation is low due to not considering actual data node conditions

Engineering Contradiction:
Improvecost estimation accuracyVSAvoidcost estimation complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent implements feedback by collecting monitoring data from data nodes (CPU usage, memory usage, I/O status, network status) and using this real-time information to adjust and update the cost estimation of execution plans. The cost estimation model continuously incorporates feedback from actual system conditions to improve accuracy.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent changes the parameters used in cost estimation from static historical data to dynamic monitoring data including CPU usage rate, memory usage rate, I/O status, and network status. These parameter changes allow the cost estimation to reflect actual system conditions accurately.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If multiple candidate execution plans are evaluated with detailed monitoring data, then the accuracy of final execution plan selection is improved, but the computational overhead and time consumption increase

Engineering Contradiction:
Improveexecution plan selection reliabilityVSAvoidplan optimization time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies partial action by selecting only the top K candidate execution plans for detailed evaluation instead of evaluating all possible plans. This reduces computational overhead while still ensuring the optimal plan is found among the most promising candidates.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent performs preliminary filtering of execution plans before detailed cost estimation by using basic criteria to eliminate obviously suboptimal plans. This preliminary action reduces the number of plans requiring comprehensive monitoring data analysis.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12536172B2Data query optimization method, electronic device and storage medium
Publication Date: 2026.01.27 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US12536172B2 patent drawing
  • US12536172B2 patent drawing
  • US12536172B2 patent drawing

AI summary

Provided is a data query optimization method, an electronic device and a storage medium, relating to the field of data processing technology and in particular to the technical fields of distributed database, big data, cloud computing and others. The method includes: determining a plurality of candidate execution plans for a target query request; determining execution costs of the plurality of candidate execution plans; updating the execution costs of the plurality of candidate execution plans based on monitoring data of data nodes involved in the plurality of candidate execution plans, to obtain final costs of the plurality of candidate execution plans; and screening out a final execution plan for the target query request from the plurality of candidate execution plans based on the final costs of the plurality of candidate execution plans.