Three top DB2 Index questions you need to know

In DB2, Index is critical object to improve the search performance when you access Table data. The index is like searching key word in a book at the end you can see.

The point is you can create any number of indexes on a table.

The UNIQUE in create index is to enforce uniqueness when you enter data. That means it will not allow duplicate entries on that column. This is the main benefit of UNIQUE.

Also read:

The second point…

What will happen when Index created on empty table.

Then, the index table will not be updated. So the index table is empty.

What will happen when index created on Table which has already data.

Then, Index table will be updated with entries.

The index disadvantage

If a large number of indexes are created for a table that is modified frequently, overall performance will decrease.

Any time when Index is created on a existing table, if data is compromised, it will generate an error.

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.