Database Query Optimization Using Join Cardinality Tags

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional database systems perform unnecessary joins during query processing, leading to inefficiencies in query processing time and complexity due to the lack of specific criteria for optimizing join operations.

Innovation Solution

A database management system (DBMS) utilizes join cardinality information to tag join operations, allowing it to selectively remove unnecessary tables from the query processing plan, thereby simplifying and optimizing the query execution plan based on the type of join operation and cardinality tag.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the database system performs all specified join operations in the query, then completeness of data retrieval is ensured, but query processing time and complexity increase due to unnecessary joins

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidquery processing time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent extracts and removes unnecessary tables from the query processing plan by analyzing join cardinality tags. The optimizer identifies tables that can be safely excluded based on cardinality information (one-to-one, one-to-many, many-to-one relationships) and removes them before query execution, thereby reducing processing time while maintaining result correctness.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary analysis of join cardinality tags during query optimization, before actual query execution. By pre-tagging join operations with cardinality information and pre-identifying removable tables in the query processing plan, the system prepares an optimized execution plan that avoids unnecessary joins from the outset.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the database system includes all tables in join operations, then data completeness is maintained, but query processing complexity increases

Engineering Contradiction:
Improvedata retrieval accuracyVSAvoidquery processing complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts unnecessary tables from the query processing plan by evaluating join cardinality tags. Tables that do not contribute to the final query result based on their cardinality relationships are removed, simplifying the execution plan while preserving data retrieval accuracy for necessary tables.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameter of join operation optimization by introducing cardinality tags (one-to-one, one-to-many, many-to-one) that provide specific guidance to the query optimizer. This parameter change enables the optimizer to make informed decisions about which joins are necessary, reducing processing complexity while maintaining reliability.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If the database system performs unnecessary join operations, then all specified data sources are processed, but processing time and computational resources are wasted

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidcomputational resource waste
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent extracts and removes unnecessary tables from the query processing plan by analyzing join cardinality tags. This extraction eliminates wasted computational resources on processing tables that would not contribute to the final query result, thereby improving processing efficiency and reducing energy consumption.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent enables the query optimizer to automatically analyze join cardinality tags and self-determine which tables are necessary for query execution. This self-service optimization occurs without requiring manual intervention, automatically eliminating unnecessary joins and reducing resource waste while improving efficiency.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10133778B2Query optimization using join cardinality
Publication Date: 2018.11.20 SAP SE
  • US10133778B2 patent drawing
  • US10133778B2 patent drawing
  • US10133778B2 patent drawing

AI summary

Disclosed herein are system, method, and computer program product embodiments for utilizing join cardinality to improve the performance of query processing. An embodiment operates by a database engine receiving a query including a join operation on a first and a second table using a join predicate, and a tag for the join operation indicating a cardinality relationship between the first and the second table when satisfying the join predicate. Then, the database engine generates a query processing plan for performing the query. For the join operation, the database engine selects one of the first or the second tables to remove from the join operation based on a type of the join operation and the tag. Based on the selecting, the database engine may remove may the join operation and the selected table from the query processing plan.