Implementing Db2 indexes
Indexes provide efficient access to table data, but can require additional processing when you modify data in a table.
Db2 uses indexes for a variety of reasons. Db2 indexes enforce uniqueness on column values, as in the case of parent keys. Db2 indexes are also used to cluster data, to partition tables, to provide access paths to data, and to order retrieved data without a sort. You can also choose to use indexes because of access requirements.
Using indexes involves a trade-off. A greater number of indexes can simultaneously improve the performance of a certain transaction and require additional processing for inserting, updating, and deleting index keys.
After you create an index, Db2 maintains the index, but you can perform necessary maintenance, such as reorganizing it or recovering it, as necessary.