As large amount of data is being generated and stored in the database, performance and data manageability is a concern. The key challenges when dealing with such data include :
Index is a database object created on frequently accessed columns of a table. Indexes contain keys that point to the physical location of where the data is being stored. DB2 Indexes work just like an index in a book to provide a quick and easy reference to data within the table.
A composite index is one index made up of combined values from multiple columns in a table. If multiple columns in a table will often be accessed together a composite index will be efficient.
A clustered index is one whose order of the rows in the data pages correspond to the order of the rows in the index. For example, if the clustering index is defined on a date key, then the DB2 database manager will attempt to rearrange data physically in ascending or descending date sequence.
This tutorial demonstrates indexing over tables and highlights the best practices to do the same. The need for creating indexes and their advantages are analysed. A graph comparing the query execution time against the tables with and without indexes is generated and the steps to create an explain snapshot displaying the use of indexes during query processing are indicated.