Alternating Row Column Lock Queues Database Concurrency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional database systems face limited concurrency due to sub-optimal one-dimensional locking mechanisms, which hinder efficient execution of both row-oriented and column-oriented operations, leading to potential delays and reduced throughput.
Innovation Solution
A device and method utilizing separate queues (C-queue for column-oriented and R-queue for row-oriented operations) and a scheduler to alternate between C-type and R-type time slots, allowing for parallel execution of operations with different locking modes, thereby reducing lock collisions and enhancing concurrency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If one-dimensional row locking is used in traditional database systems, then row-oriented operations can be executed, but column-oriented operations suffer from limited concurrency and lock collisions
Solution Approach 1:
The patent segments the operation queue into two separate queues: a C-queue for column-oriented operations and an R-queue for row-oriented operations. This segmentation allows each queue type to be processed with appropriate locking mechanisms, preventing lock collisions between different operation types while maintaining support for both operational modes.
Solution Approach 2:
The patent transitions from one-dimensional locking (single queue processed sequentially) to two-dimensional processing by introducing separate queues for different operation orientations. This dimensional change enables concurrent processing of column-oriented and row-oriented operations without lock interference, thereby improving database throughput.
2Adaptability or versatility
If column locks are used to allow concurrent column writes and queries, then column-oriented operations can run in parallel, but row-oriented operations may be blocked
Solution Approach 1:
The patent implements periodic alternation between processing C-queue operations and R-queue operations through time slots. During C-type time slots, column-oriented operations execute with column locks; during R-type time slots, row-oriented operations execute with row locks. This periodic switching ensures both operation types receive appropriate locking support without continuous blocking.
Solution Approach 2:
The scheduler performs preliminary classification of incoming operations into C-queue or R-queue based on their orientation requirements. This preliminary action ensures that operations are routed to the appropriate queue before execution, preventing lock conflicts and ensuring that row-oriented operations are scheduled during R-type time slots when row locks are available.
3Productivity
If separate queues and alternating time slots are used to reduce lock collisions, then throughput increases, but system complexity increases
Solution Approach 1:
The scheduler implements a universal interface that accepts both column-oriented and row-oriented operations without requiring separate scheduling mechanisms. The single scheduler handles both queue types, classifies operations, and manages time slot allocation, thereby reducing overall system complexity despite the dual-queue architecture.
Solution Approach 2:
The system dynamically adjusts the alternation between C-type and R-type time slots based on queue depths and operation priorities. This dynamic scheduling allows the system to adapt to varying workloads, processing more C-queue operations when column-oriented requests accumulate and more R-queue operations when row-oriented requests increase, thereby optimizing throughput without rigid complexity.
Data Source
AI summary
A device for executing an operation on a database is provided. The device comprises a C-queue configured to store a plurality of column-oriented operations, an R-queue configured to store a plurality of row-oriented operations, a scheduler configured to assign the operation to the C-queue or the R-queue based on whether the operation is row-oriented, a timing unit configured to alternate between C-type time slots and R-type time slots, an execution unit configured to execute operations from the C-queue in C-type time slots and/or operations from the R-queue in R-type time slots.


