SQL Query Scheduling with Metadata Prediction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for scheduling SQL operations on heterogeneous systems, comprising CPUs and accelerators like GPUs or MICs, fail to optimize memory usage and throughput effectively, leading to inefficiencies in executing SQL queries.

Innovation Solution

The proposed solution involves using compression schemes and prediction algorithms based on metadata analysis to determine the most suitable device for executing SQL operators, maximizing memory usage by estimating result set sizes and offloading calculations to accelerators, while employing splitters and markers for fine-grained data management and cache optimization to reduce memory allocation overhead and improve storage access patterns.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If SQL operators are executed on heterogeneous systems with CPUs and accelerators, then computational power and throughput are improved, but memory usage efficiency deteriorates due to inadequate optimization

Engineering Contradiction:
Improvequery execution throughputVSAvoidmemory usage efficiency
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The system performs metadata analysis and prediction algorithms before query execution to estimate result set sizes and determine optimal device allocation. This preliminary action allows the system to pre-configure memory allocation and device assignment, avoiding inefficient runtime memory management and improving both throughput and memory efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically changes execution parameters by selecting different devices (CPU vs. accelerator) based on predicted query characteristics and result set sizes. This parameter optimization ensures that queries are executed on the most appropriate hardware, maximizing throughput while efficiently utilizing available memory resources.

Inventive Principle:
Principle #35Parameter changes

2Loss of time

If result set sizes are not estimated, then memory allocation overhead increases, but query execution speed may be improved by avoiding prediction overhead

Engineering Contradiction:
Improvememory allocation overheadVSAvoidquery execution speed
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The system performs metadata analysis and result set size prediction before query execution. This preliminary action provides accurate size estimates that enable efficient memory allocation, reducing allocation overhead during query execution while the prediction itself is performed using optimized algorithms that minimize overhead impact.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses metadata copies and statistical representations to predict result set sizes without requiring full data analysis. This copying approach allows rapid estimation using compressed metadata rather than examining actual data, reducing prediction overhead while maintaining accurate memory allocation planning.

Inventive Principle:
Principle #26Copying

3Quantity of substance

If data is not organized with splitters and markers, then storage access simplicity is improved, but memory allocation overhead and storage access efficiency deteriorate

Engineering Contradiction:
Improvememory allocation overheadVSAvoiddata organization structure
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The system organizes data into segments marked by splitters and markers, dividing large datasets into manageable chunks that can be efficiently processed and allocated in memory. This segmentation enables precise control over memory allocation for each data segment, reducing overall allocation overhead while the structured organization is managed through specialized hardware or software components.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The splitters and markers act as intermediary structures between raw data and the query processing system. These intermediaries provide the necessary organizational framework for efficient memory allocation and storage access, mediating between simple data storage and complex query requirements without requiring complete reorganization of the underlying data.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP2901334B1A system and a method for executing SQL-like queries with add-on accelerators
Publication Date: 2022.03.02 SQREAM TECH
  • EP2901334B1 patent drawingFigure 1
  • EP2901334B1 patent drawingFigure 2
  • EP2901334B1 patent drawingFigure 3

AI summary

According to some embodiments is disclosed a method for controlling and scheduling operation of at least one SQL operator on data chunk. The method comprising the step of: receiving SQL query, accessing data chunk blocks, receive meta data statistics and SQL query, analyzing the query selectivity, result size and Frequency moments calculation during the query execution run-time and choosing the right device to execute the each operator of the query according to analysis and predict results size.