Efficient database undo / redo logging
First Claim
1. A method comprising:
- accessing, as part of a database operation in a database, log records logging insert, update, and delete operations in the database, the log records including a row position, a fragment identifier (ID), and a row ID of a row in a table, the row position representing an offset where the row is stored in an array of a fragment of a table, the fragment ID representing an immutable identifier of the fragment at which the row is stored, and the row ID representing an immutable identifier of the row;
in response to a determination that the fragment having the fragment ID is available in the database, using the fragment ID and the row position of the row to locate the row as part of the database operation;
in response to a determination that the fragment having the fragment ID is unavailable in the database, using the row ID of the row to determine a new row position of the row, the new row position being determined based on an index that maps row IDs to corresponding row positions; and
finalizing the database operation using the located rows.
2 Assignments
0 Petitions
Accused Products
Abstract
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.
102 Citations
20 Claims
-
1. A method comprising:
-
accessing, as part of a database operation in a database, log records logging insert, update, and delete operations in the database, the log records including a row position, a fragment identifier (ID), and a row ID of a row in a table, the row position representing an offset where the row is stored in an array of a fragment of a table, the fragment ID representing an immutable identifier of the fragment at which the row is stored, and the row ID representing an immutable identifier of the row; in response to a determination that the fragment having the fragment ID is available in the database, using the fragment ID and the row position of the row to locate the row as part of the database operation; in response to a determination that the fragment having the fragment ID is unavailable in the database, using the row ID of the row to determine a new row position of the row, the new row position being determined based on an index that maps row IDs to corresponding row positions; and finalizing the database operation using the located rows. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A non-transitory computer program product storing instructions which, when executed by at least one data processor forming part of at least one computing device, result in operations comprising:
-
accessing, as part of a database operation in a database, log records logging insert, update, and delete operations in the database, the log records including a row position, a fragment identifier (ID), and a row ID of a row in a table, the row position representing an offset where the row is stored in an array of a fragment of a table, the fragment ID representing an immutable identifier at which the row is stored, and the row ID representing an immutable identifier of the row; in response to a determination that the fragment having the fragment ID is available in the database, using the fragment ID and the row position of the row to locate the row as part of the database operation; in response to a determination that the fragment having the fragment ID is unavailable in the database, using the row ID of the row to determine a new row position of the row, the new row position being determined based on an index that maps row IDs to row positions; and finalizing the database operation using the located rows.
-
-
20. A system comprising:
-
at least one data processor; and at least one memory storing instructions which, when executed by the at least one data processor, result in operations comprising; accessing, as part of a database operation in a database, log records logging insert, update, and delete operations in the database, the log records including a row position, a fragment identifier (ID), and a row ID of a row in a table, the row position representing an offset where the row is stored in an array of a fragment, the fragment ID representing an immutable identifier of the fragment at which the row is stored, and the row ID representing an immutable identifier of the row; in response to a determination that the fragment having the fragment ID is available in the database, using the fragment ID and the row position of the row to locate the row as part of the database operation; in response to a determination that the fragment having the fragment ID is unavailable in the database, using the row ID of the row to determine a new row position of the row, the new row position being determined based on an index that maps row IDs to corresponding row positions; and finalizing the database operation using the located rows.
-
Specification