Database Query Plan Validation via Threshold Rule Substitution
Find Innovative SolutionsGenerate 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
Engineering 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
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.
2Reliability
If threshold rules are applied to restrict operations, then database stability is improved, but query processing time increases due to validation overhead
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.
3Productivity
If resource-intensive operations are prevented, then performance issues are reduced, but query functionality is limited
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.
Data Source
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.


