Fast/Reload and INVISIBLE fields
One of the features of Fast/Reorg is to allow ORDERED INVISIBLE field values to be
preserved over a file reorganization in a generic manner.
That is, once you define and load all of your INVISIBLE fields
ORDERED INVISIBLE or
ORDERED NUMERIC INVISIBLE,
you will never again have to worry
about losing INVISIBLE fields over a reorganization.
In addition to preserving ORDERED INVISIBLE fields over a file reorganization, Fast/Reorg does some cleanup of the INVISIBLE Ordered Index data. Specifically, index entries associated with non-existent records are deleted over the reorganization process. This is accomplished in two steps:
- Fast/Unload does not unload any index data associated with records outside the range of record numbers unloaded. Thus, if an unload is done in two passes, the index data unloaded in the first pass will contain record numbers in the range of records unloaded in the first pass.
- Fast/Reload discards index data associated with deleted records.
For example, if you unload record numbers 0 through 1,422,633 in an unload, the invisible index value associated with record number 2,422,666 would not be unloaded. Note that if record 944,433 had been deleted but had Ordered Index invisible data in Table D, this data would be unloaded by UAI. When LAI attempts to convert record number 944,433 to a new record number, it would notice that the record had not been reloaded (because it had never been unloaded) and hence would discard the Ordered Index data for that record. This cleanup of ORDERED INVISIBLE Index data ensures that Table D space is not wasted by ORDERED INVISIBLE Index data for deleted records.
Note: If you are using INVISIBLE fields (ordered or non-ordered) with Reuse Record Number (RRN) files, there is nothing that prevents a deleted record from being replaced by another record, thus rendering the INVISIBLE index value for that record number erroneously "valid" again. This is a generic problem with RRN files and INVISIBLE fields, and it is not exacerbated by the use of Fast/Reorg.
In fact, Fast/Reorg gives you an option to eliminate the use of RRN files in an application requiring the use of INVISIBLE fields, and instead to rely on the speed and ease of use of Fast/Reorg to recover record numbers by means of frequent reorganizations.