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

What is the use of commit in db2?

639


can all users have the privilage to use the sql statement select * (dml)?

649


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

621


Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?

6902


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

585






How do I connect my db2 database to ibm?

610


What is scrollable cursor in db2?

594


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

734


What is the use of db2?

597


How can you do the explain of a dynamic sql statement?

641


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

10817


B37 abend during spufi?

991


How can deadlocks be resolved?

549


What kind of database is db2?

586


Explain in brief how does db2 determine what lock-size to use?

605