Fujitsu J2X0-2273-01EN Server User Manual


 
index for each column of a table. Multiple columns also can be combined and specified as a single index. Searching a
column for which no index has been created is less efficient than searching a column having an index. Thus, an index
must be created for a column used as a data search key. However, whenever an index is created, additional database
capacity is required for the storage. Carefully consider the space required for each index when determining the size of
a database space.
Although an index affects the database capacity and data manipulation efficiency, it does not affect the data
manipulation. The user need not be concerned with indexes when developing application programs that use SQL
statements to manipulate data.
An index is defined by a storage structure definition statement.
An index is defined for a column of a base table. An index cannot be defined for a view.
An index is defined after the schema is defined and before data is stored in the database. However, an index may also
be defined after data is stored in the database by database generation or data manipulation. An index is created in a
database space following database generation after an index has been defined and when data manipulation (update)
is performed.
Figure: Concept of an index shows an index created for the STOCKQTY column of the STOCK table. This figure
portrays the concept of an index; it does not accurately represent the database format.
[Figure: Concept of an index]
The STOCKQTY index consists of STOCKQTY values and pointers indicating the position of the corresponding row in
the STOCK table, sorted by STOCKQTY value order. For example, say the user specifies a search for the row of the
STOCK table for which the STOCKQTY value is 60. In this case, first the STOCKQTY index is searched. Since the
index is arranged by STOCKQTY value order, the search can be performed very quickly. Once the search of the index
is completed, the position of the row in the STOCK table is revealed by the corresponding pointer. The specified row
can thus be obtained.
7