What is the difference between Type 1 indexes and Type 2 indexes ?
Type 1 indexes and Type 2 indexes on DB2
Version 8 introduced Type 2 indexes as a new standard index type, replacing the V7 Type 1 indexes.
Both indexes currently coexist, however, Type 1 indexes will be de-supported in the future. The type 2 index is replacement for the old Type 1 index, which has suffered from:
- concurrency issues during inserts and next key locks
- performance issues due to physically removing a key from a leaf page during update or delete
Some benefits of Type 2 indexes:
- no more physical action after delete or update action until final commit
- next-key locking is reduced to a minimum, dramatically improving concurrency
- online index reorganization supported
- can be created on columns whose length is greater than 255 bytes