Database Query Plan Validation via Threshold Rule Substitution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Poorly written queries can lead to unresponsive database behavior and crashes due to resource-intensive operations like Cartesian joins and table scans, resulting in inaccurate and misleading results, and there is a need for a system to prevent such queries from executing.

Innovation Solution

A method that traverses the query plan to identify tables with threshold rules, substituting operations to prevent Cartesian joins and table scans by leveraging referential constraints and threshold rules, ensuring optimal resource usage and accurate results.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If the query plan is executed without validation, then query processing speed is improved, but database stability deteriorates due to resource-intensive operations

Engineering Contradiction:
Improvequery processing speedVSAvoiddatabase stability
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The system performs preliminary validation of the query plan before execution by traversing the plan and identifying operations that match threshold rules for resource-intensive operations. This preliminary check prevents unstable queries from being executed while allowing valid queries to proceed without delay.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If threshold rules are applied to restrict operations, then database stability is improved, but query processing time increases due to validation overhead

Engineering Contradiction:
Improvedatabase stabilityVSAvoidquery processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The validation process extracts only the critical path operations from the query plan that match threshold rules for resource-intensive operations. By focusing validation efforts only on these specific operations rather than the entire query plan, the system minimizes validation overhead while maintaining database stability.

Inventive Principle:
Principle #2Taking out (Extraction)

3Productivity

If resource-intensive operations are prevented, then performance issues are reduced, but query functionality is limited

Engineering Contradiction:
Improvedatabase performanceVSAvoidquery functionality
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system applies threshold rules selectively to specific operations within the query plan based on their resource consumption characteristics. Rather than uniformly restricting all operations, the validation process identifies and restricts only those operations that match defined threshold rules for resource-intensive operations, allowing other operations to proceed normally.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10579619B2Validation of query plan
Publication Date: 2020.03.03 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10579619B2 patent drawing
  • US10579619B2 patent drawing
  • US10579619B2 patent drawing

AI summary

Database query optimization method that provides for selective restriction of an operation. A query plan for a query is received. The query plan includes an operation to be executed on a table. The received query plan is traversed to determine at least one table in the query plan having a mapping with a threshold rule and based upon a determination that there is at least one table in the query plan having a mapping with the threshold rule, substituting the operation on the at least one table identified in the query plan to another operation having the mapping with the threshold rule.