Set-Oriented Visibility State Retrieval for Database MVCC
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In database systems using multi-version concurrency control (MVCC), the row-oriented visibility state retrieval (VSR) operations incur high transactional costs for analytical queries that need to access a large number of rows, as each row's visibility is checked individually, leading to inefficient processing.
Innovation Solution
Implementing a set-oriented VSR scheme that allows the visibility of multiple rows to be checked in a single batch operation, using a visible row state array and a versioned row state array to determine visibility states, reducing the need for individual row checks and optimizing processing efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If row-oriented VSR operation is used to check visibility of each row individually, then visibility accuracy is maintained, but processing time and transactional cost increase significantly for analytical queries accessing large numbers of rows
Solution Approach 1:
The patent merges individual row visibility checks into a single set-oriented operation by combining multiple row visibility determination logic into one unified processing step. This is achieved by loading visibility state information for multiple rows into memory structures (such as bitmaps or arrays) and performing batch processing, where the system evaluates visibility for many rows simultaneously rather than sequentially, thus maintaining accuracy while dramatically reducing processing time
Solution Approach 2:
The patent performs preliminary actions by pre-loading visibility state information and row metadata into memory before the actual visibility determination is needed. The system prepares data structures such as visible row state arrays and versioned row state arrays in advance, so that when visibility checks are required, the system can operate on pre-prepared data rather than querying storage systems for each row, thereby reducing latency while preserving accuracy
2Measurement precision
If row-oriented VSR operation is used, then individual row visibility is accurately determined, but the number of instructions and processing overhead increase for large-scale queries
Solution Approach 1:
The patent combines multiple row visibility determination operations into a single set-oriented processing step. By merging the visibility check logic for multiple rows into one unified operation that operates on collections of rows simultaneously, the system maintains precise visibility determination while reducing the total number of instructions executed and minimizing processing overhead associated with repeated individual row operations
Solution Approach 2:
The patent changes the operational parameters from processing one row at a time to processing sets of rows in parallel. This involves transforming the visibility determination mechanism to work with batched data structures and parallel processing modes, which reduces instruction count and overhead while preserving the accuracy of individual row visibility assessments through systematic evaluation of all rows in the set
3Productivity
If set-oriented VSR scheme is implemented to check visibility of multiple rows in batch operation, then processing efficiency and memory efficiency are improved, but system complexity increases
Solution Approach 1:
The patent segments the set-oriented visibility determination process into distinct functional components: data structure management (visible row state array, versioned row state array), memory management (prefetching, caching), and visibility evaluation logic. This segmentation allows the complex set-oriented operation to be implemented through modular, manageable components that can be independently optimized and maintained, reducing the perceived system complexity while preserving processing efficiency
Solution Approach 2:
The patent introduces intermediary data structures such as visible row state arrays and versioned row state arrays that act as mediators between the raw database rows and the visibility determination logic. These intermediary structures pre-organize and pre-process visibility-relevant information, allowing the main visibility evaluation algorithm to operate on simplified data representations, thereby reducing system complexity while maintaining high processing efficiency
4Reliability
If individual row visibility checks are performed, then transactional accuracy is maintained, but memory access overhead and I/O operations increase for analytical queries
Solution Approach 1:
The patent merges multiple individual memory access operations into a single batched memory access operation. By loading visibility state information for multiple rows into memory structures in one operation and performing set-oriented visibility evaluation, the system maintains transactional accuracy through proper evaluation of all rows while dramatically reducing memory access overhead and I/O operations compared to sequential individual row checks
Data Source
AI summary
Disclosed herein are system, method, and computer program product embodiments for determining row visibility states. An embodiment operates by initializing a result bitmap for rows based on visible row state values of row state bitmaps corresponding to the rows, wherein values of the result bitmap indicate whether the row are visible or not visible; determining one or more rows whose corresponding visible row state values indicate that the one or more rows are not visible; and determining whether to update the result bitmap to indicate that the one or more rows are visible based on one or more versioned row state values, wherein the one or more versioned row state values indicate whether the corresponding rows are not visible or possibly visible.


