What is a clustering index ?

Answer Posted / mainframe.rahulz

A DB2 index is a clustering index if the CLUSTER keyword is
specified when the index is created.In a clustered index
rows are stored continuously in a an
order.

When you define a clustering index on a DB2 table, you
direct DB2 to insert rows into the table in the order of the
clustering key values. The first index that you define on
the table serves implicitly as the clustering index unless
you explicitly specify CLUSTER when you create or alter
another index. For example, if you first define a unique
index on |the EMPID column of the EMP table, DB2 inserts
rows into the EMP table in the order of the EMPLOYEE ID
unless you explicitly define another index to be the
clustering index

Eg:CREATE INDEX Index name
ON tablename CLUSTER;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How and when does the db2 enforces the unique key?

825


What is ibm db2 used for?

807


How to find the maximum value in a column in the db2 database?

802


What is performance tuning db2?

812


What is difference between isnull and coalesce?

789


How does cobol compile db2 program?

800


Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

960


What is consistency token in db2?

844


What is bind package and plan in db2?

789


What is host variable?

781


What is isolation level in db2?

742


is it compulsory commitment control in journal?

2184


How to view db2 table structure?

773


What are the two types of logging in the db2 database? Explain them.

763


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

883