DB2 Primary key and Index
DB2 Primary key and Index

Before I write about Index i just want to make clear the difference between Primary key and index:

Primary key: It is not allowed duplicates

Index: It speeds up performance of access.

There are 7 indexes in DB2.

  • Clustering index: It helps the way data physically stored in database
  • Uniq index: This will be  given normally with primary key column. The value is unique.
  • Partitioned index: Index is located in partitioned datasets
  • NPS: Non-partitioned secondary index
  • DPSI: Data partitioned secondary index
  • Single column index: Index on only one column
  • Multi column index: Index on multi columns
Advertisements