reorg indexes and reorg table for DB2 V8.1

Dear all,

is the use of reorg table  and reorg indexes  for DB2 V8.1 only for reclaim disk space only? what else?

1) will this command give trouble?

reorg indexes all for table ROOT.T595

reorg table ROOT.T595 inplace allow write access

2) can I do reorg indexes all for table ROOT.T595 inplace allow write access ?

so that I reorg/rebuilt index online ?
LVL 1
marrowyungSenior Technical architecture (Data)Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

marrowyungSenior Technical architecture (Data)Author Commented:
it seems that  reorgs generate a lot of transaction log, however must be logged, so there is no way to reduce or predict amount of logging to be done .

Anything is check the size of the log ?
0
Kent OlsenDBACommented:
Hi marrowyung,

I suggest that you read the IBM writeup on REORG logging.

  http://publib.boulder.ibm.com/infocenter/db2luw/v10r5/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.perf.doc%2Fdoc%2Fc0024860.html

Basically, it says that it's more efficient to use the offline reorg, which uses no log space, but requires sufficient extra storage to save another copy of the table.  The log space required for an online reorg can be larger than the table.


Kent
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
marrowyungSenior Technical architecture (Data)Author Commented:
ok, but you can brief what is the main different between them ? what use is it?

I will read that later on as I am trying to solve some urgent problem.

someone said online reorg is much better, hard to believe.
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Kent OlsenDBACommented:
Online REORG keeps the database up while the REORG runs.  Offline REORG requires that the database be offline or quiesced.  (Maybe just a full table lock.  I don't remember.)

If you can tolerate the database being unavailable for some period, use the offline reorg.  If you need to keep the database up, use the online reorg, though it might slow down database queries.
0
marrowyungSenior Technical architecture (Data)Author Commented:
basically reorg index first or reorg table first?
0
Kent OlsenDBACommented:
Table.  Reorganizing the table moves data around within the table.  Do that, then reorganize the index(es).
0
marrowyungSenior Technical architecture (Data)Author Commented:
ok, thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.