ROLAP Sort Removal for Database Optimizer Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Relational database management systems face challenges in optimizing SQL query processing for column-major layouts, particularly with high CPU and memory utilization during ROLAP operations, and the need for specific query optimizers for either row-major or column-major formats, which limits optimal handling of both table types.

Innovation Solution

A method to modify SQL statements by removing ROLAP sort operations and processing them as either row- or column-based, enhancing the database optimizer engine's capabilities to transform between formats, thereby improving CPU and memory utilization and generating optimized query plans.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If ROLAP sort operations are executed in column-organized databases, then query results are obtained, but CPU and memory utilization become excessively high

Engineering Contradiction:
Improvequery processing speedVSAvoidCPU and memory utilization
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The system dynamically changes the storage format parameter from column-major to row-major ordering based on the query characteristics. When a ROLAP query is detected, the system determines whether converting to row-major storage would optimize performance, and if so, it transforms the data layout accordingly, thereby reducing CPU and memory utilization while maintaining query functionality

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces an intermediary component (the format conversion mechanism) between the ROLAP query and the column-organized database. This intermediary automatically detects ROLAP queries and converts them to appropriate row-based operations, mediating the conflict between column-organized storage efficiency and ROLAP query requirements

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If specific query optimizers are developed for row-major or column-major formats, then optimization performance is improved, but the system complexity increases and cannot optimally handle both table types

Engineering Contradiction:
Improvequery optimization performanceVSAvoidoptimizer system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent creates a universal query optimizer that can handle both row-major and column-major storage formats through a single automated detection and conversion mechanism. Rather than maintaining separate optimizers for each format, the system uses one optimizer that automatically detects the storage format and adapts its optimization strategy accordingly, reducing system complexity while maintaining optimization performance

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

Instead of having the optimizer adapt to different storage formats, the patent inverts the approach by having the system automatically convert queries to the most appropriate format before execution. This inversion simplifies the optimizer design by allowing it to work with a single optimized format while the conversion layer handles the diversity of storage requirements

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS11768833B2Optimizing relational online analytical processing sort operations
Publication Date: 2023.09.26 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11768833B2 patent drawing
  • US11768833B2 patent drawing
  • US11768833B2 patent drawing

AI summary

Concepts for processing a SQL statement comprising a ROLAP sort operation are presented. One such concept comprises: determining whether a ROLAP partitioning column of the SQL statement does not refer to database columns from a sort operation of the SQL statement; and determining whether the ROLAP partitioning columns of the SQL statement are all referenced in the output of the SQL statement. Responsive to determining a ROLAP partitioning column of the SQL statement does not refer to database columns from a sort operation of the SQL statement, and to determining all of the ROLAP partitioning columns of the SQL statement are referenced in the output of the SQL statement, the SQL statement is modified by removing the ROLAP sort operation from the SQL statement.