Database Undo Redo Logging Using Row Position and Fragment ID
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing in-memory database systems face inefficiencies in undo/redo operations due to reliance on inverted indexes for record access, particularly when dealing with multiple fragments containing the same row identifier, which slows down record access and merge operations.
Innovation Solution
Incorporating row positions and fragment identifiers into log records for faster access during database operations, allowing for quicker record location and reducing the need for inverted index lookups, especially during merge operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If inverted indexes are used for record access in undo/redo operations, then data integrity is maintained, but access time increases and efficiency decreases
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing row positions and fragment identifiers in log records at the time of data modification. This allows the undo/redo operations to directly access records using these pre-stored position information without performing index lookups during the actual undo/redo operations, thereby resolving the contradiction between maintaining data integrity and reducing access time.
2Measurement precision
If inverted index lookups are performed for each record access during undo/redo operations, then accurate record location is achieved, but operation speed decreases
Solution Approach 1:
The patent extracts the essential location information (row position and fragment identifier) from the index lookup process and stores it directly in the log records. This extraction eliminates the need for repeated index lookups during undo/redo operations, maintaining accurate record location while significantly improving operation speed by removing the intermediate lookup step.
Solution Approach 2:
The patent creates a copy of the essential location information (row position and fragment identifier) from the index structure and embeds it directly in the log records. This copying mechanism allows the system to access records directly using the copied position information without needing to query the original inverted index during undo/redo operations, thereby improving operation speed while maintaining location accuracy.
3Productivity
If row positions are stored in log records for direct access, then access efficiency improves, but log record size and storage requirements increase
Solution Approach 1:
The patent applies local quality by storing compact row position and fragment identifier information specifically in the log records where it is most needed for undo/redo operations. Rather than duplicating entire index structures or storing redundant information throughout the system, the solution locally enhances the log records with precisely the position information required for efficient direct access, minimizing the increase in log record size while maximizing access efficiency.
Data Source
AI summary
Log records are accessed as part of a database operation in a database. The log records log insert, update, and delete operations in the database and include, for each row, a row position, a fragment identifier (ID), and a row ID. Thereafter, as part of the database operation, rows specified by the log records are located by: using the fragment identifier and the row position within the corresponding record of the log if the fragment with the corresponding fragment identifier is still available, otherwise, using the row identifier within the corresponding record of the log to look up the row position in an index of a corresponding row identifier column. The database operation is then finalized using the located rows. Related apparatus, systems, techniques and articles are also described.


