By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,016 Members | 2,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,016 IT Pros & Developers. It's quick & easy.

Question on a table reorg with clustering index.

P: n/a
Running DB2 version 8.1.1 on AIX 5.1.1

The table (employee) is being reorged and has a clustering index
(empid).

Is there any different between these two commands?

db2 reorg table employee index empid allow no access indexscan

db2 reorg table employee index empid allow no access

Thanks
Gerry

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
<da*******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Running DB2 version 8.1.1 on AIX 5.1.1

The table (employee) is being reorged and has a clustering index
(empid).

Is there any different between these two commands?

db2 reorg table employee index empid allow no access indexscan

db2 reorg table employee index empid allow no access

Thanks
Gerry

There is no functional difference in the result. If you use "indexscan", DB2
will use the index to retrieve the rows and avoid an external sort of the
data.
Nov 12 '05 #2

P: n/a
Also note that empid is the index with the cluster clause (clustering index)
and therefore you don't need to mention it in the reorg command. It will
"see" it as the clustering and use it to retrieve the rows in the reorg to
rebuild the table in the sequence of the indexscan and as mentioned, no
sort.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Mark A" <no****@nowhere.com> a écrit dans le message de
news:no********************@comcast.com...
<da*******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Running DB2 version 8.1.1 on AIX 5.1.1

The table (employee) is being reorged and has a clustering index
(empid).

Is there any different between these two commands?

db2 reorg table employee index empid allow no access indexscan

db2 reorg table employee index empid allow no access

Thanks
Gerry
There is no functional difference in the result. If you use "indexscan",

DB2 will use the index to retrieve the rows and avoid an external sort of the
data.


Nov 12 '05 #3

P: n/a
Thanks much for the replies.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.