jane wrote:
Hi,
Just wondering, is there any way to do the online reorg to use
temporary tablespace instead of tablespace table existed.
since that is really a waste to have some space allocated aside only
for the online reorg ..
I know offline reorg could use temporary tablespace ..is that so
difficult to add this feature to online reorg?
maybe had some reason ..
You're misunderstanding the key difference between offline and inplace
reorg.
Offline reorg creates a copy of the *entire* table, and then drops the
old copy of the table. If you don't have enough space in the original
tablespace to create this copy (or are really concerned about the
tablespace HWM) you can tell the offline reorg to build a copy in a
temporary tablespace. When it does this, it builds the copy in the
temp tablespace, drops the original table, and then copies the data
from the temp tablespace back to the original data tablespace.
For online (a.k.a. inplace) reorg, DB2 does the cleanup a page at a
time. So instead of having overhead of 2*table size, you only have
a few extra pages overhead. Therefore, it makes no sense to use a
temporary tablespace for an inplace reorg.