Query Processing Candidate Selection for Cost Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing query processing methods are inefficient as they either execute queries as received or transform them based on heuristics, without considering more optimal execution paths, leading to higher computational costs.

Innovation Solution

The techniques involve determining semantically equivalent queries with lower costs by employing exhaustive, linear, or iterative candidate selection methods, which include subquery unnesting, view merging, and predicate manipulation to identify the most cost-effective query for execution or storage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If queries are executed as received or transformed based on heuristics, then query processing can be performed, but computational costs are higher than necessary

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidcomputational cost
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The system performs preliminary actions by generating multiple semantically equivalent candidate queries and evaluating their costs before executing the original query. This allows the system to identify and select the lowest-cost query variant in advance, avoiding the need to execute more expensive queries that would result from simple heuristic transformation or direct execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system changes parameters by transforming queries into semantically equivalent variants with different structural parameters (e.g., different join orders, different expansion strategies for disjunctive queries). By evaluating multiple parameter configurations and selecting the optimal one, the system reduces computational cost while maintaining query correctness.

Inventive Principle:
Principle #35Parameter changes

2Use of energy by moving object

If multiple semantically equivalent queries are generated and evaluated, then lower computational costs can be achieved, but query processing complexity increases

Engineering Contradiction:
Improvecomputational costVSAvoidquery processing complexity
Core Design Contradiction:
Use of energy by moving objectVSDevice complexity

Solution Approach 1:

The system applies partial action by generating candidate queries selectively based on the query structure. For disjunctive queries, it generates candidates by expanding different disjuncts in different orders. For queries with subqueries, it generates candidates by unnesting subqueries at different positions. This selective generation avoids the excessive complexity of evaluating all possible query transformations while still finding cost-effective solutions.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system segments the query processing task into distinct phases: generating candidate queries from the original query, evaluating the cost of each candidate, and selecting the lowest-cost candidate for execution. This segmentation manages complexity by breaking down the overall task into smaller, more manageable subtasks that can be handled systematically.

Inventive Principle:
Principle #1Segmentation

3Productivity

If candidate queries are selected based on cost estimation, then query execution efficiency improves, but additional processing time is required for candidate selection

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidcandidate selection time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary cost estimation and candidate selection before query execution. By evaluating and selecting the optimal candidate query in advance, the system ensures that the most efficient execution path is chosen, which compensates for the additional preliminary processing time and improves overall query execution efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system replaces mechanical trial-and-error query execution with a systematic cost-based selection mechanism. Instead of executing queries and measuring performance empirically, the system uses cost estimation models to predict and compare the efficiency of different query variants, enabling more intelligent and time-efficient query optimization.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS7814042B2Selecting candidate queries
Publication Date: 2010.10.12 ORACLE INT CORP
  • US7814042B2 patent drawing
  • US7814042B2 patent drawing
  • US7814042B2 patent drawing

AI summary

In an example embodiment, multiple candidate selection techniques are made available to a query-processing unit for processing a query. A candidate selection technique is chosen from among the available candidate selection techniques for an incoming query. The candidate selection technique may be chosen based on a configuration file or user input or based on some aspect of the query, the user, or the database on which the query will run. A set of semantically equivalent queries (also called a set of candidate queries) is determined for an the incoming query based on the chosen candidate selection technique. A choice is then made among the candidate queries, usually based on a cost measure, as to which query to execute or store for later execution.