Query Optimizer Eliminates Redundant Tables and Joins
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database systems face inefficiencies due to logically unnecessary join operations in queries, which are often introduced by middleware software or human developers unaware of query optimization intricacies, leading to increased processing costs.
Innovation Solution
Techniques for detecting and eliminating unnecessary semi-join, anti-join, and outer-join operations by applying specific constraints and rewriting queries to remove extraneous tables, thereby optimizing query execution plans.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If join operations are added to queries to retrieve data from multiple tables, then data completeness is improved, but query processing cost increases
Solution Approach 1:
The patent extracts and removes unnecessary tables and join operations from queries while preserving the logical correctness of the query results. The query optimizer identifies extraneous tables that do not contribute to the final query output and eliminates them, thereby reducing processing overhead while maintaining data completeness.
Solution Approach 2:
The patent changes the parameters of join operations by transforming them into more efficient forms. Specifically, it converts unnecessary semi-joins, anti-joins, and outer-joins into simpler operations or eliminates them entirely, changing the operational parameters to reduce computational cost while preserving query semantics.
2Ease of operation
If middleware software automatically generates queries from declarative input, then ease of use is improved, but query optimization quality deteriorates
Solution Approach 1:
The patent introduces a query optimizer as an intermediary component between the middleware software and the database execution engine. This intermediary analyzes automatically generated queries, identifies unnecessary join operations, and rewrites them to eliminate extraneous tables, thereby compensating for the lack of optimization awareness in middleware-generated queries.
Solution Approach 2:
The patent implements a feedback mechanism where the query optimizer analyzes the structure of generated queries, identifies inefficiencies, and provides rewritten versions back to the execution engine. This feedback loop ensures that even automatically generated queries undergo optimization to remove unnecessary operations.
3Ease of manufacture
If human developers write queries without knowledge of query optimization, then ease of manufacture is improved, but unnecessary join operations are introduced
Solution Approach 1:
The patent extracts and removes unnecessary join operations from queries written by human developers who may not be aware of optimization intricacies. The query optimizer identifies extraneous tables and eliminates them, simplifying the query structure while maintaining its logical correctness.
Solution Approach 2:
The patent enables queries to self-optimize through the query optimizer, which automatically analyzes and rewrites queries to eliminate unnecessary operations. This self-service mechanism allows developers to write simple queries without worrying about optimization, as the system automatically corrects structural inefficiencies.
4Adaptability or versatility
If semi-join, anti-join, and outer-join operations are used in queries, then query expressiveness is improved, but processing overhead increases
Solution Approach 1:
The patent changes the parameters of join operations by transforming unnecessary semi-joins, anti-joins, and outer-joins into simpler operations or eliminating them entirely. This parameter transformation reduces computational overhead while preserving the expressive intent of the original queries.
Solution Approach 2:
Instead of adding complex join operations to achieve query goals, the patent inverts the approach by starting with the necessary operations and eliminating redundant ones. This inversion strategy maintains query expressiveness while reducing processing overhead by removing unnecessary complexity.
Data Source
AI summary
Methods for transforming a query to remove redundant tables and eliminate superfluous join operations is provided. The methods provided transform queries to remove redundant tables and anti-joins, semi-joins, and outer-joins. Whether a table is redundant is determined based on a set of criteria which, if fulfilled, indicates that the removal of the table and the anti-join, semi-join, or outer-join operation does not impact query results. The removal of a redundant table from a query also results in the elimination of the anti-join, semi-join, or outer-join operation that references the removed table.


