Business Intelligence Tutorial

Creating an index

You can create an index to optimize queries for end users of the warehouse. An index is a set of keys, each pointing to a set of rows in a table. The index is a separate object from the table data. The database manager builds the index structure and maintains it automatically. An index gives more efficient access to rows in a table by creating a direct path to the data through the pointers that it creates.

An index is created when you define a primary key or a foreign key. For example, an index was created on the LOOKUP_MARKET table when you defined CITY_ID as its primary key in Lesson 11, Defining keys on target tables.

To create additional indexes:

  1. From the DB2 Control Center, expand the objects within the TUTWHS database until you see the Indexes folder.
  2. Right-click the Indexes folder and click Create --> Index Using Wizard.

    The Connect window opens.

  3. Type the userid and password that you use to log onto the Control Center.
  4. Click OK.

    The Index wizard opens.

  5. Follow the detailed instructions in the wizard to build a new index.

For more information about creating an index, see the DB2 Universal Database Administration Guide.


[ Top of Page | Previous Page | Next Page | Table of Contents ]