Fast Building of Collections

You can move the building or rebuilding of some ObjectSet and MemberKeyDictionary collections from the Relationship Maintenance phase to the Object Conversion phase of the reorganization process, by setting the FastBuildBTreeCollections parameter in the [JadeReorg] section of the JADE initialization file to true.

Fast building of collections significantly reduces the elapsed time of large database reorganizations involving collection maintenance, by using a faster extract, sort, and build algorithm and by allowing the collection maintenance to be performed in parallel by multiple reorganization workers using much less random I/O activity.

Additional disk space up to three times the total size of the collections being built or rebuilt is required for extract and sort files.

Fast building of collections is available only for non-updating reorganizations. If you enable fast building of collections, you must disallow updates when you initiate the reorganization, as follows.

Fast building or rebuilding of collections for a MemberKeyDictionary or ObjectSet reference occurs when the inverse is an existing object reference; that is, for a many-to-one relationship. The update mode of the collection reference must be automatic and that of the object reference must be manual. The ObjectSet reference includes subclasses of the collection class ObjectSet and subclasses of the collection class Set where the membership is a class. Member key dictionaries can have key paths and collection references with constraint methods.

Fast building of collections can be invoked for the following structural changes.

Fast building of collections is not allowed when:

By default, the extract and sort files are placed in the database directory (that is, the directory containing the database control file). You can specify another location by using the ReorgSortDirectory parameter in the [JadeReorg] section of the JADE initialization file.

The dictionary key sort uses up to 50M bytes of memory for each reorganization worker, by default. You can increase the amount of sort memory to improve the sort performance when the total key length exceeds 30 bytes, using the WorkerSortMemory parameter in the [JadeReorg] section of the JADE initialization file.

Fast-built collections are densely packed, leaving two free entries in each block which gives an approximate load factor of 98 percent. For new collections, user-coded constructors are not executed and user-specified property values are initialized with null values. For existing collections that are rebuilt, user-specified property values are retained.

When a reorganization with the FastBuildBTreeCollections parameter set to true is replayed by a roll-forward recovery or on a secondary SDS or RPS node, the entire fast building process involving extracts, sorts, and builds does not occur. Instead, the collection headers and blocks audited during the original reorganization build jobs on the primary SDS node are applied from the journal by the reorganization worker after the objects have been converted and copied to the .reo files.