5 Database Administration

Call Data Tables

Table Searches

Indexes and Key Fields

Think of a database table as a book. If you want to find information on a subject, you must search the book to find it. However, checking the index first helps you to locate the information in the book much more quickly than paging through the book. The same is true for finding data in a database table.

For large databases, you can use indexes on key fields to greatly reduce the time necessary to search the tables.

Indexed fields can be especially important in applications that require a “lookup” from a large table based on user input. This input generates a SQL statement for accessing the database that has the following form:

SELECT * from “table_name” where “FIELD1” = ‘data’;

If FIELD1 has an index created for it in the database, all records that match the criteria specified in the select statement are located much faster than if there is no index.

FIELD1 is a key field in this example because it is the field used to specify selection criteria. Indexes only decrease read time when they are created on key fields.

UCS 1000 R4.2 Administration 585-313-507

Issue 3 April 2000 210