Hybrid Parallelization for In-Memory Table Scans

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face inefficiencies in processing table scans due to high processing costs and inability to dynamically adjust resource allocation based on changing workloads during query execution, leading to suboptimal performance.

Innovation Solution

Implement hybrid parallelization techniques by dividing work into process-level and thread-level granules, where the number of processes remains static but the number of threads can be dynamically adjusted based on workload, allowing for efficient distribution of tasks across multiple processes and threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the number of processes is increased to improve query processing speed, then productivity is improved, but device complexity increases and resource management becomes less flexible

Engineering Contradiction:
Improvequery processing speedVSAvoidprocess management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the parallel processing architecture into two distinct levels: process-level segmentation for work granule distribution and thread-level segmentation for task execution within each process. This hierarchical segmentation allows the system to maintain a smaller number of processes while achieving fine-grained parallelism through threads, thereby improving query processing speed without proportionally increasing process management complexity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension of parallelism by adding thread-level parallelism within processes. Instead of solely relying on increasing the number of processes (one-dimensional parallelism), the system exploits the thread dimension within each process to achieve multi-dimensional parallelism. This allows more tasks to be executed concurrently without requiring a proportional increase in the number of processes.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Device complexity

If the number of processes is fixed at query initialization, then device complexity is reduced, but adaptability to changing workloads deteriorates

Engineering Contradiction:
Improveprocess allocation simplicityVSAvoidworkload adaptation capability
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamics by allowing the number of threads per process to be adjusted during query execution based on workload conditions. While the number of processes remains fixed (static), each process can dynamically spawn or terminate threads according to the current system state and workload demands. This dynamic thread management enables the system to adapt to changing workloads without the complexity of dynamically creating or destroying processes.

Inventive Principle:
Principle #15Dynamics

3Device complexity

If work is divided into fewer work granules, then device complexity is reduced, but productivity decreases due to insufficient parallelism

Engineering Contradiction:
Improvework granule management complexityVSAvoidparallel processing efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent applies segmentation by dividing work into a manageable number of work granules at the process level, and then further segmenting each work granule into multiple tasks at the thread level. This two-level segmentation strategy prevents the need to manage a large number of fine-grained work units directly, reducing process management complexity while still enabling fine-grained parallelism through thread-level task execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements a nested structure where tasks are nested within work granules, and work granules are nested within processes. This nested organization allows the system to maintain a coarse-grained view at the process level (fewer work granules) while hiding fine-grained parallelism at the task level within each work granule. The nesting enables productive parallelism without exposing the full complexity of fine-grained task management to the process level.

Inventive Principle:
Principle #7Nested doll (Nesting)

4Device complexity

If the system cannot adjust processes during query processing, then device complexity is reduced, but productivity decreases when workload changes

Engineering Contradiction:
Improveprocess adjustment overheadVSAvoidquery processing speed under varying workload
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent implements dynamics by enabling thread-level adaptability within the static process framework. When workload increases, processes can spawn additional threads to handle more tasks concurrently; when workload decreases, threads can be terminated to conserve resources. This dynamic thread management allows the system to respond to workload changes and maintain optimal query processing speed without the overhead of dynamically adjusting the number of processes.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11003664B2Efficient hybrid parallelization for in-memory scans
Publication Date: 2021.05.11 ORACLE INT CORP
  • US11003664B2 patent drawing
  • US11003664B2 patent drawing
  • US11003664B2 patent drawing

AI summary

Techniques are described herein for hybrid parallelization of in-memory table scans. Work for an in-memory scan is divided into granules based on a degree of parallelism. The granules are assigned to one or more processes. The work for each granule is further parallelized by dividing the work granule into one or more tasks. The tasks are assigned to one or more threads, the number of which can be dynamically adjusted.