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

about online reorg

P: n/a
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 ..

just think if there is a way to do that , that would be perfect.
Jul 9 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ian
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.

Jul 10 '08 #2

P: n/a
On Jul 10, 11:33*am, Ian <ianb...@mobileaudio.comwrote:
jane wrote:
Hi,
Just wondering, is there any way to do theonlinereorgto use
temporarytablespaceinstead oftablespacetable existed.
since that is really a waste to have some space allocated aside only
for theonlinereorg..
I know offlinereorgcould usetemporarytablespace..is that so
difficult to add this feature toonlinereorg?
maybe had some reason ..

You're misunderstanding the key difference between offline and inplacereorg.

Offlinereorgcreates a copy of the *entire* table, and then drops the
old copy of the table. *If you don't have enough space in the originaltablespaceto create this copy (or are really concerned about thetablespaceHWM) you can tell the offlinereorgto build a copy in atemporarytablespace. *When it does this, it builds the copy in the
temptablespace, drops the original table, and then copies the data
from the temptablespaceback to the original datatablespace.

Foronline(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 atemporarytablespacefor an inplacereorg.- Hide quoted text -

- Show quoted text -
Thanks for your reply..

but I'm still not quite understand the reorg inplace..

let's say even one extent at a time, it would not cause my tablespace
full if we do reorg online in the tablespace..but why I keep on
getting tablespace full message .. it seems more safer if I had
tablespace 50% free to do the online reorg...
Jul 17 '08 #3

P: n/a
Ian
jane wrote:
>
Thanks for your reply..

but I'm still not quite understand the reorg inplace..
The manual describes it better than I did:

http://publib.boulder.ibm.com/infoce...c/c0024854.htm

let's say even one extent at a time, it would not cause my tablespace
full if we do reorg online in the tablespace..but why I keep on
getting tablespace full message .. it seems more safer if I had
tablespace 50% free to do the online reorg...
If you're getting tablespace full errors, how full is your tablespace
when you start the reorg?
Jul 18 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.