469,317 Members | 1,915 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

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 2098
<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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.