Reorganization of Databases by Sectioning
Abstract
Technologies are described for a system and method for reorganizing a tablespace in a database such that rows of the tablespace are arranged in a sequence defined in a balanced tree-type clustering index of the tablespace. The method includes sectioning the clustering index and the tablespace into sections including logically distinct sets of data by reading only tree pages of the clustering index to determine logical divisions. The method further includes allocating an amount of output space on a storage device for each section of the tablespace and of the clustering index, to provide for each section a first range of storage space for an output clustering index for the section, and a second range of storage space for an output tablespace for the section. The method further includes scheduling a reorg task for each section, and executing, by at least one processor, the scheduled reorg tasks on the sections.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method of reorganizing a tablespace in a database such that rows of the tablespace are arranged in a sequence defined in a clustering index of the tablespace, the method comprising:
sectioning the clustering index and the tablespace into sections comprising logically distinct sets of data; allocating output space on a storage device for each section of the tablespace and of the clustering index, to provide for each section a first range of storage space for an output clustering index for the section, and a second range of storage space for an output tablespace for the section; scheduling a reorg task for each section; and. executing the scheduled reorg tasks on the sections.
2 . The method of claim 1 , wherein executing the scheduled reorg tasks on the sections comprises, for each section:
reading the tablespace rows in the section; writing the tablespace rows into the second range of storage space for the output tablespace, such that a physical order of the rows in the second range of storage space corresponds to a logical order; and preparing new entries in the output clustering index.
3 . The method of claim 1 , wherein executing the scheduled reorg tasks comprises processing a plurality of the reorg tasks in parallel.
4 . A system comprising:
a storage facility storing a tablespace of a database and a clustering index of the tablespace, the storage facility connected to a channel and configured to transfer data over the channel; and a computer comprising at least one processor, a memory, and communication circuitry connected to the channel and configured to transfer data over the channel, wherein the computer is configured to reorganize the tablespace such that rows of the tablespace are arranged in a sequence defined in the clustering index by executing instructions that cause the at least one processor to: section the clustering index and the tablespace into sections comprising logically distinct sets of data; allocate an amount of output space on the storage facility for each section of the tablespace and of the clustering index, to provide for each section a first range of storage space for an output clustering index for the section, and a second range of storage space for an output tablespace for the section; schedule a reorg task for each section; and execute the scheduled reorg tasks on the sections.
5 . The system of claim 4 , wherein the computer comprises a plurality of processors, and wherein the computer is configured to execute the scheduled reorg tasks by processing a plurality of the reorg tasks in parallel on the plurality of processors.Join the waitlist — get patent alerts
Track US2021209087A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.