Query Optimizer Table Elimination for Duplicate-Insignificant Joins

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database queries often contain inefficient join operations due to unnecessary tables, leading to increased execution time and resource usage, particularly when generated by middleware software or human developers without optimization checks.

Innovation Solution

The method involves evaluating queries for outer-joined and cross-joined table elimination in duplicate-insignificant query blocks, removing non-preserved tables and corresponding join operations, thereby transforming the queries to reduce unnecessary processing and conserve resources.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If join operations are added to combine table contents, then data completeness is improved, but query execution time increases

Engineering Contradiction:
Improvedata completenessVSAvoidquery execution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts and removes unnecessary tables from join operations through query rewriting. The query optimizer identifies tables that can be eliminated without affecting result correctness, thereby reducing execution time while preserving data completeness for necessary joins.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the execution parameters by transforming the query execution plan to evaluate join necessity dynamically. It modifies how joins are executed by eliminating redundant ones, changing the operational parameters from executing all specified joins to executing only necessary joins.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If join operations are added to combine table contents, then data completeness is improved, but resource usage increases

Engineering Contradiction:
Improvedata completenessVSAvoiddatabase resource usage
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts unnecessary tables from the query execution plan through automated rewriting. By removing redundant table accesses and join operations, it reduces CPU, memory, and I/O resource consumption while preserving the completeness of necessary data retrieval.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The query optimizer performs self-service by automatically analyzing and rewriting queries to eliminate unnecessary joins. This self-optimization process reduces resource usage without requiring manual intervention, making the system efficient while maintaining data completeness.

Inventive Principle:
Principle #25Self-service

3Ease of operation

If middleware software generates queries automatically, then ease of use is improved, but query optimization is worsened

Engineering Contradiction:
Improveease of useVSAvoidquery execution efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent introduces a query rewriting intermediary layer between the middleware-generated query and the database execution engine. This intermediary automatically rewrites queries to eliminate unnecessary joins, bridging the gap between ease of use (automatic query generation) and execution efficiency (optimized query plans).

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The query optimizer provides self-service by automatically detecting and eliminating unnecessary joins in middleware-generated queries. This self-optimization compensates for the lack of manual optimization while preserving the ease of use benefits of automatic query generation.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9965516B2Outer-joined and cross-joined table elimination for duplicate-insignificant queries
Publication Date: 2018.05.08 ORACLE INT CORP
  • US9965516B2 patent drawing
  • US9965516B2 patent drawing
  • US9965516B2 patent drawing

AI summary

A method and apparatus for outer-joined and/or cross-joined table elimination for duplicate-insignificant queries is provided. A query block of a query specifies a join between a first table and a second table. The join is one of an outer join and a cross join. A first determination is made that the query block contains no references to the second table to be processed after the join. A second determination is made that the query block is duplicate-insignificant. In response to making the first determination and the second determination, the query block is transformed into a transformed query, where the second table is eliminated from a corresponding query block in the transformed query.