Parallel Recursive Query Execution via Segmented Temporary Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Executing queries with recursive clauses using multiple processes in parallel is bottlenecked by the private buffer cache, limiting the ability to share intermediate results across processes, which restricts parallel execution and leads to inefficiencies.

Innovation Solution

Implementing a system architecture that utilizes a cursor duration temporary table (CDTT) where multiple slave processes manage segments of the temporary table, allowing for parallel execution by distributing and merging results across processes, and using an in-memory CDTT to optimize performance by eliminating the need for merging segments into a master segment.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a private buffer cache is used to store intermediate results in each process, then data integrity and process isolation are maintained, but parallel execution capability is limited and query execution speed decreases

Engineering Contradiction:
Improvedata integrityVSAvoidquery execution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides the buffer cache into process-specific segments where each process has its own private buffer region. This segmentation allows multiple processes to execute in parallel while maintaining data isolation and integrity, resolving the contradiction between reliability and productivity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (the coordinated buffer cache system with version control) that manages data sharing between processes. This intermediary enables safe parallel access to intermediate results without compromising data integrity, thus improving query execution speed while maintaining reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If multiple processes execute queries in parallel, then query execution speed improves, but coordination overhead and system complexity increase

Engineering Contradiction:
Improvequery execution speedVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

Each process independently manages its own buffer cache segment and automatically handles data validation and version checking. This self-service approach reduces the need for complex centralized coordination mechanisms, allowing parallel execution with minimal overhead.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent uses version numbers as parameters to track intermediate results across iterations. By changing the state representation to include version metadata, the system enables automatic coordination without complex control logic, reducing system complexity while maintaining parallel execution capability.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If intermediate results are shared across processes, then parallel execution efficiency improves, but data consistency and isolation are compromised

Engineering Contradiction:
Improveparallel execution efficiencyVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The buffer cache is segmented into process-specific regions, allowing controlled sharing of intermediate results. Each process can read from and write to its own segment while maintaining isolation from other processes, ensuring data consistency while enabling parallel execution efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system implements feedback mechanisms through version number checking and result validation. Processes continuously monitor and validate intermediate results before using them, ensuring data consistency is maintained even when sharing results across parallel processes.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10678792B2Parallel execution of queries with a recursive clause
Publication Date: 2020.06.09 ORACLE INT CORP
  • US10678792B2 patent drawing
  • US10678792B2 patent drawing
  • US10678792B2 patent drawing

AI summary

Techniques are described herein for executing queries with a recursive clause using a plurality of processes that execute database operations in parallel. Each process of the plurality of processes either generate or are assigned a segment that is part of a temporary table. For each iteration of the recursive query, work granules are divided up and assigned to each of the plurality of processes. As each respective process produces a portion of a result set for a given iteration, that process appends said portion of the result set to the respective segment that the respective process manages. Each slave process then publishes, to one or more sources, a reference to the newly generated results. During the next iteration, any slave process may access any of the data from the previous iteration.