DEFAULT_ATTACH environment variable
The DEFAULT_ATTACH environment variable supports the legacy behavior of Version 7.x of HCL OneDB™, in which the pages of nonfragmented B-tree indexes on nonfragmented tables were stored, by default, in the same dbspace partition as the data pages. (The name "DEFAULT_ATTACH" derives from an obsolete definition of an attached index, a term that now refers to an index whose fragmentation strategy is the same as the fragmentation strategy of its table. Do not confuse the obsolete Version 7.x definition with this current definition.)
If the DEFAULT_ATTACH environment variable is set to 1, then by default, the pages of nonfragmented B-tree indexes on nonfragmented tables are stored in the same partition (and in the same dbspace) that stores data pages of the table. The IN TABLE keywords of the CREATE INDEX statement are not required (but do not return an error).
Setting DEFAULT_ATTACH to 1 has no effect, however, on any other types of indexes, whose pages are always stored in separate partitions from the data pages of the indexed table. These index types whose storage distribution is always different from that of their table include
- R-tree indexes,
- functional indexes,
- forest of trees indexes,
- fragmented indexes,
- and indexes on fragmented tables.
Index storage in the same partition as the data pages is supported only for nonfragmented B-tree indexes on nonfragmented tables.
If DEFAULT_ATTACH is not set, then by default, any CREATE INDEX statement that does not specify IN TABLE as its Storage Options clause creates an index whose pages are stored in partitions separate from the data pages. This release of HCL OneDB can support existing indexes that were created by Version 7.x of HCL OneDB.