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 to test SQL -911 error while developing COB-DB2 program

7070


Explain the benefits you can get from mainframe connect?

720


How do I delete a column in db2?

854


What is dbrm? When it will be created?

773


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

839


Explain in detail about buffer manager and its functionalities?

780


What is dbrm library?

780


List down the types of triggers in the db2 database?

767


Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

809


What is schema in db2?

768


What is deadlock in db2?

794


What is phantom read in db2?

817


How do I add a column to a table in db2?

830


Can you use max on a char column?

822


What are the different types of base tables?

763