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

REORG TABLE INPLACE - what is NOTRUNCATE TABLE for?

P: n/a
aj
DB2 LUW v8.2 FP 14 RHAS 2.1

I'm confused about the NOTRUNCATE TABLE option of the REORG TABLE
INPLACE command. In my mind, truncating the table means that you
delete all rows that it has - why would you not use this option
as part of the reorg? If you want to truncate, why not just
delete the table and recreate it w/ DDL?

I deleted a great many rows from a wide table yesterday, then did
an online/inplace REORG against it, using the NOTRUNCATE TABLE
option. To my surprise, no pages were freed up in the tablespace.
Is this because I used the NOTRUNCATE option?

Yes, I have RTFM - but all it says about the option is "Do not
truncate the table after inplace reorganization. During truncation,
the table is S-locked."

Any explanation appreciated...

aj
Mar 16 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lew
I believe the no truncate option does exactly what you saw. It
doesn't free up the empty pages for reuse by another object in the
tablespace. Those pages may be empty but they are reserved for the
object you reorged.

On Mar 16, 9:18 am, aj <ron...@mcdonalds.comwrote:
DB2 LUW v8.2 FP 14 RHAS 2.1

I'm confused about the NOTRUNCATE TABLE option of the REORG TABLE
INPLACE command. In my mind, truncating the table means that you
delete all rows that it has - why would you not use this option
as part of the reorg? If you want to truncate, why not just
delete the table and recreate it w/ DDL?

I deleted a great many rows from a wide table yesterday, then did
an online/inplace REORG against it, using the NOTRUNCATE TABLE
option. To my surprise, no pages were freed up in the tablespace.
Is this because I used the NOTRUNCATE option?

Yes, I have RTFM - but all it says about the option is "Do not
truncate the table after inplace reorganization. During truncation,
the table is S-locked."

Any explanation appreciated...

aj
Mar 16 '07 #2

P: n/a
Ian
aj wrote:
Yes, I have RTFM - but all it says about the option is "Do not
truncate the table after inplace reorganization. During truncation,
the table is S-locked."
As the manual says, during the truncation the table is S-locked, which
means that it is read only.

This read-only phase may not be desirable in certain situations, which
is why you can eliminate it with the NOTRUNCATE TABLE option.
Mar 18 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.