Row-Level Locking in Columnar Database Compression Units

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In database systems, the existing hybrid columnar format for storing data leads to increased lock contention and overhead due to the need to lock entire compression units, which can delay database operations and inefficiently manage transaction concurrency.

Innovation Solution

Implementing row-level locking using variable lock vectors that expand or shrink based on transaction activity, allowing individual rows to be locked without affecting others, thereby reducing lock contention and optimizing storage overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If entire compression units are locked to ensure data consistency, then reliability is improved, but device complexity and lock contention increase

Engineering Contradiction:
Improvedata consistencyVSAvoidlock management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent divides the compression unit into individual row-level locks, allowing separate locking of each row within the compression unit. This segmentation enables finer-grained lock control, reducing lock contention while maintaining data consistency. Each row can be locked independently rather than requiring locks on the entire compression unit.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic lock vector expansion where the lock vector size automatically adjusts based on the number of active transactions. When transaction activity increases, the lock vector expands to accommodate more transaction IDs. This dynamic approach optimizes memory usage while ensuring reliability under high concurrency conditions.

Inventive Principle:
Principle #15Dynamics

2Productivity

If lock vectors are expanded to support more transactions, then transaction concurrency is improved, but storage overhead increases

Engineering Contradiction:
Improvetransaction concurrencyVSAvoidstorage overhead
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The lock vector is implemented as a dynamic data structure that automatically expands and shrinks based on the number of active transactions. This allows the system to support high transaction concurrency when needed while minimizing storage overhead during periods of lower activity. The lock vector size is not fixed but adapts to actual workload requirements.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the size parameter of the lock vector dynamically based on transaction activity levels. When the number of active transactions exceeds the current lock vector capacity, the vector is expanded to a larger size. This parameter change enables the system to accommodate varying concurrency demands without permanently allocating maximum storage resources.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If row-level locking is implemented in hybrid columnar format, then lock contention is reduced, but storage overhead increases

Engineering Contradiction:
Improvelock contention reductionVSAvoidstorage overhead
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent introduces row-level lock vectors within compression units of hybrid columnar storage. Each compression unit contains a lock vector that tracks locks at the row level rather than requiring compression unit-level locks. This segmentation enables reduced lock contention while working within the hybrid columnar format's storage structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The row-level lock vectors are implemented with dynamic sizing capabilities, allowing the storage system to allocate lock tracking resources only when needed. This dynamic approach minimizes the permanent storage overhead while enabling row-level locking benefits during high-concurrency operations.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11269829B2Row level locking for columnar data
Publication Date: 2022.03.08 ORACLE INT CORP
  • US11269829B2 patent drawing
  • US11269829B2 patent drawing
  • US11269829B2 patent drawing

AI summary

Row locking is performed at the row level of granularity for database data stored in columnar form. Row level locking entails use of a lock vector that is stored in a compression unit in a data block, the compression unit storing rows in columnar-major format. On an as needed basis, the lock vector is expanded to identify more transactions affecting the rows in the compression unit.