Indexes in DB2 These 3 are Must Know Rules

The index improves the performance of the search. The index looks like a keyword at the end of a book. Here are three must-know points.


You can create indexes on a table. The UNIQUE keyword in creating an index enforces uniqueness when you enter data. That means it will not allow duplicate entries on that column. It is the main benefit of UNIQUE.

2. Index on an Empty Table

The second point.

What will happen if you create an index on an empty table? There will be no entry in the index table.

3. Index on Non-empty Table

What will happen when you create an index on a table which is non-empty? Then, the Index-table will have entries.

The index disadvantage

If a large number of indexes you create for a table is modified frequently, overall performance will decrease.  

References and resources

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.