In DB2, Index is critical object to improve the search performance. 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 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.
Index on a Empty Table
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.
Index on a Table of Non-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