471,854 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,854 software developers and data experts.

Question on a table reorg with clustering index.

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
3 2219
<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
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
Thanks much for the replies.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Jean | last post: by
3 posts views Thread by datapro01 | last post: by
2 posts views Thread by TomHorner | last post: by
4 posts views Thread by cmitchell | last post: by
2 posts views Thread by datapro01 | last post: by
5 posts views Thread by Sam Durai | last post: by
NeoPa
reply views Thread by NeoPa | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.