Online database table reorganization
First Claim
1. A method for reorganizing a database table online, allowing the database table to be scanned, accessed and updated during the reorganization, the method steps comprising:
- a) moving a subset of records within the database table;
b) flagging each moved record as a reorganization record;
c) creating a reorganization pointer record for each moved record at the initial location of the moved record, the reorganization pointer record pointing to the new location of the moved record; and
d) establishing scanner process constraints based on whether a scanner process is commenced prior to or after the moving, wherein the scanner process can correctly retrieve records from the database table during the reorganization of the database table, including before and after movement of records in the reorganization.
1 Assignment
0 Petitions
Accused Products
Abstract
A database table reorganization is defined to permit online access of the table during the reorganization. Records are reorganized in the database table by vacating records from a defined number of pages and then filling the pages with records in accordance with a desired ordering for the records. Temporary pointers to the new locations of moved records are used to prevent table scanner access to the database table from missing or duplicating records while scanning the database table during reorganization. Removal of the temporary pointers is synchronized with the completion of scanning of all table scanners that are commenced during a time when records are being moved as part of a vacating or filling step.
94 Citations
49 Claims
-
1. A method for reorganizing a database table online, allowing the database table to be scanned, accessed and updated during the reorganization, the method steps comprising:
-
a) moving a subset of records within the database table;
b) flagging each moved record as a reorganization record;
c) creating a reorganization pointer record for each moved record at the initial location of the moved record, the reorganization pointer record pointing to the new location of the moved record; and
d) establishing scanner process constraints based on whether a scanner process is commenced prior to or after the moving, wherein the scanner process can correctly retrieve records from the database table during the reorganization of the database table, including before and after movement of records in the reorganization. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
-
-
18. A method for reorganizing a database table online, allowing the database table to be scanned, accessed and updated during the reorganization, the method comprising the steps of:
-
a) a vacate move step that relocates a subset of records in a defined set of pages to available space within the database table using temporary pointers;
b) a vacate clean up step that removes the temporary pointers of the vacate move step;
c) a fill move step that moves selected records to the defined set of pages using temporary pointers; and
d) a fill clean up step that removes the temporary pointers of the fill move step, wherein each clean up step is synchronised to commence at the completion of a move step and to commence only when all queries launching scanner processes commenced before the completion of a move step have completed and each move step is synchronised to commence at the completion of a clean up step and to commence only when all queries launching scanner processes after the completion of a previous move step have completed. - View Dependent Claims (19)
-
-
30. A computer readable medium containing program instructions for reorganizing a database table online, allowing the database table to be scanned, accessed and updated during the reorganization, the program instructions comprising the steps of:
-
a) moving a subset of records within the database table;
b) flagging each moved record in as a reorganization record;
c) creating a reorganization pointer record for each moved record in at the initial location of the moved record, the reorganization pointer record pointing to the new location of the moved record; and
d) establishing scanner process constraints based on whether a scanner process is commenced prior to or after the moving, wherein the scanner process can correctly retrieve records from the database table during the reorganization of the database table, including before and after movement of records in the reorganization. - View Dependent Claims (31, 32, 33)
-
-
34. A computer readable medium containing program instructions for reorganizing a database table online, allowing the database table to be scanned, accessed and updated during the reorganization, the program instructions comprising the steps of:
-
a) a vacate move step that relocates a subset of records in a defined set of pages to available space within the database table using temporary pointers;
b) a vacate clean up step that removes the temporary pointers of the vacate move step;
c) a fill move step that moves selected records to the defined set of pages using temporary pointers; and
d) a fill clean up step that removes the temporary pointers of the fill move step, wherein each clean up step is synchronised to commence at the completion of a move step and to commence only when all queries launching scanner processes commenced before the completion of a move step have completed and each move step is synchronised to commence at the completion of a clean up step and to commence only when all queries launching scanner processes after the completion of a previous move step have completed. - View Dependent Claims (35, 36, 37, 38, 39)
-
-
40. A computer system for reorganizing a database table online, allowing the database table to be scanned, accessed and updated during the reorganization, the computer system comprising
means for moving a subset of records within the database table; -
means for flagging each record moved by the means for moving a subset of records as a reorganization record;
means for creating a reorganization pointer record for each record moved by the means for moving a subset of records at the initial location of the moved record, the reorganization pointer record pointing to the new location of the moved record; and
means for establishing scanner process constraints based on whether a scanner process is commenced prior to or after moving the subset of records, wherein the scanner process can correctly retrieve records from the database table during the reorganization of the database table, including before and after movement of records in the reorganization. - View Dependent Claims (41, 42, 43)
-
-
44. A computer system for reorganizing a database table online, allowing the database table to be scanned, accessed and updated during the reorganization, the computer system comprising:
-
means for performing a vacate move step that relocates a subset of records in a defined set of pages to available space within the database table using temporary pointers;
means for performing a vacate clean up step that removes the temporary pointers of the vacate move step;
means for performing a fill move step that moves selected records to the defined set of pages using temporary pointers; and
means for performing a fill clean up step that removes the temporary pointers of the fill move step, wherein each clean up step is synchronised to commence at the completion of a move step and to commence only when all queries launching scanner processes commenced before the completion of a move step have completed and each move step is synchronised to commence at the completion of a clean up step and to commence only when all queries launching scanner processes after the completion of a previous move step have completed. - View Dependent Claims (45, 46, 47, 48, 49)
-
Specification