Database Query Aggregation via Inner Join Overlay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Left outer joins in relational databases are processing intensive and inefficient, leading to significant resource consumption and performance impacts due to the need for checking NULL conditions and producing rows with NULL values.

Innovation Solution

A method that replaces left outer joins with a new instruction involving the creation of a temporary table with NULL values for all columns and an inner join to generate a preliminary results set, which is then overlaid on the temporary table to update NULL values, effectively producing the same results without the inefficiencies of left outer joins.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a left outer join instruction is executed to combine tables in a relational database, then all rows from the left table are included in the result set (even with NULL values from the right table), but the operation becomes processing intensive and inefficient with significant resource consumption

Engineering Contradiction:
Improvecompleteness of result setVSAvoidquery execution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the left outer join operation into two distinct phases: first executing an inner join to obtain matching rows, then separately handling NULL value insertion for non-matching rows. This segmentation allows the database to optimize each phase independently, avoiding the performance penalty of traditional left outer joins while maintaining result completeness.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary action by first executing the inner join to obtain the preliminary results set containing all matching rows. This preliminary set is then used as a foundation, and NULL values are inserted in a subsequent step for rows that require them. This approach avoids the inefficiency of processing all rows simultaneously in a traditional left outer join.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If a left outer join is used to ensure all rows from the left table are returned, then NULL condition checking is required for each row, but this checking process consumes significant processing time and resources

Engineering Contradiction:
Improvecorrectness of NULL handlingVSAvoidprocessing time for NULL checking
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts the NULL handling operation from the main join processing flow. Instead of checking for NULL conditions during the join operation itself, the system first performs the inner join to get matching rows, then separately identifies and inserts NULL values for non-matching rows. This extraction eliminates the need for continuous NULL checking during the join process, significantly reducing processing time.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent creates a copy of the left table's rows and performs the inner join on this copied set. The original left table data is preserved, and the copy is used for joining operations. This allows efficient processing while maintaining the ability to insert NULL values where needed, without requiring complex NULL checking during the join operation.

Inventive Principle:
Principle #26Copying

3Ease of operation

If traditional left outer join methods are used to produce rows with NULL values, then the operation is simple to implement, but the processing time is hundreds of times slower than necessary

Engineering Contradiction:
Improvesimplicity of join operationVSAvoidquery execution speed
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent introduces an intermediary structure - a temporary results set from the inner join - that mediates between the left table and the final output. This intermediary contains all the matching data, and NULL values are inserted into this intermediate structure before producing the final result set. This approach maintains operational simplicity while achieving hundreds of times faster execution compared to traditional left outer joins.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11308086B2Increasing database performance through query aggregation
Publication Date: 2022.04.19 KYNDRYL INC
  • US11308086B2 patent drawing
  • US11308086B2 patent drawing
  • US11308086B2 patent drawing

AI summary

A method, computer program product, and system includes a processor(s) executing a new instruction in place of a left outer join instruction to generate a data set, where the left outer join instruction includes at least two tables and an indication of a column in each the tables to join on. Executing the new instruction includes the processor(s) creating a temporary table including all columns of the at least two tables, where values in fields of the temporary table are null values, executing an inner join instruction, the inner join instruction includes the indication of the column in each of the at least two tables to join on, to create a preliminary results set, and generating the data set, wherein the generating includes the processor(s) overlaying the preliminary results set on the temporary table to update a portion of the null values with values from the preliminary results set.