摘要 |
A method for reorganizing database index files without performing a conventional sort operation. The index file uses a balanced tree structure, with the logical order of the entries in each page being maintained by the database program. In the reorganizing method the logical order of the leaf pages is determined. A logical order buffer is developed which correlates the logical order to the physical order. This buffer is transposed to a physical order to logical order buffer. A large buffer is set aside in memory and the index file is read sequentially. As each physical page is read, it is placed in its logical position in the large memory buffer. When the large buffer is filled, the pages are sequentially written to a new index file, with the various tree pages being developed in the fly. When the writing operation is completed, the old index file is removed and the new, ordered index file is used.
|