"Uthuras" <uthurashotmail.com> wrote in message
news:2ebe688f.0309120205.97b63e7posting.google.co m...These are not 3 different kinds of indexes. All three attributes can be> Greetings,
> I would like to know what are the type of indexes supported in DB2. Is
> there any doentation that i could refer ? Does DB2 support Hash
> index ?
> I noticed, the CREATE INDEX gives 3 type of indexes, UNIQUE,CLUSTER
> and ALLOW
> REVERSE SCAN. How these indexes differ from each other ?
> Prompt feedback on this much appreciated
defined for a single index.
The unique clause specifies that each entry in the index only has one
occurrence, such as employee_id in an employee table.
Cluster defines the desired order of the rows in the table (the rows in all
indexes are always in exact sequence). The clustering index is used to order
the table rows during a reorg. It is also used (if defined) to determine
where DB2 physically places a row when an INSERT for the table is used
(unless the APPEND command has been defined on a table). Only one index can
be defined as clustering since the sequence of the rows in the table can
only be defined once. If no clustering index is defined, the index used to
determined the order of the rows can be explicitly defined in the reorg
command and all rows inserted into the table will be at the end of the
Reverse scan is an option on an index that allow more efficient use of
DESCENDING order sequence on an ORDER BY clause. Unless you have an SQL
SELECT that uses sort by descending for a column that is in an index,
probably not a good idea to use this clause.