> > If one of the indexes is defined as "clustered" then DB2 will use it
to order rows during a reorg and during an insert.
If no index is defined as clustered, then an index must be specified
at time of reorg to order the table rows, and DB2 inserts wherever in
the table it is convenient.
i don't understand
example :
table1 has 3 indexes : index1, index2, index3
i issue the following command
db2 reorg table table1 index index2
after that, how can i retrieve the table has benn reorganised by using the
index2
I think that now index2 is a cluster index ?
If yes, :
in db2 v7, how can i reorganise all index without issuing all these commands
:
db2 reorg table table1 index index1
db2 reorg table table1 index index2
db2 reorg table table1 index index3
In V6, if reorg the table, all the indexes get reorged. When you
specify the index in the reorg column, it is used to specify the order
of the rows in the table.
Specifying an index to use during the reorg will not make it the
clustering index (which is only specified in the create index
statement). It will order the rows during the reorg, but will have no
effect where DB2 inserts new rows (as would be the case if you
specified a clustering index).
When specifying a clustering index, you need to leave enough percent
free on the table (in-betwen reorgs) for DB2 to attempt to insert the
rows in the desired order within the table.