Reorg tables

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
maidy
Registered Member
Posts: 11
Joined: Fri Feb 21, 2014 11:57 pm

Reorg tables

Post by maidy »

Hello People!!

How to know when I need to reorganize tables?
A systems analyst told me that the system performance is poor. And asked me to reorganize tables. How to know which tables should be reorganized without knowing what programs are with the poor performance??

Thanks a lot!! :D
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Reorg tables

Post by Anuj Dhawan »

DB2 Tables REORG and performance tuning of programs involved are two different things. Said that, if you're talking about DB2 on z/OS - read about DB2 RUNSTATS Utility.

According to the above link:
Run RUNSTATS to help evaluate the design of the database and determine when the REORG utility should be run for specific table spaces or indexes.
This is another link on RUNSTATS, which gives more explanation about it.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Reorg tables

Post by zprogrammer »

A very good link here to start with REORG
zprogrammer
Quasar Chunawala
Registered Member
Posts: 34
Joined: Sun Aug 11, 2013 4:48 pm
Location: Pune

Re: Reorg tables

Post by Quasar Chunawala »

Maidy,

To add here, you not only re-organize tables but also re-organize indexes! As time goes by, insertions and deletions can cause tables, indexes to be dis-organized. In brief, REORG's put table data on the pages in order(clustering sequence). Free-space is reset. DB2 maintains real-time statistics about tables/indexes in SYSTABLESPACESTATS and SYSINDEXSPACESTATS. Explore these.

Thanks,
Quasar C.
maidy
Registered Member
Posts: 11
Joined: Fri Feb 21, 2014 11:57 pm

Re: Reorg tables

Post by maidy »

Hello Quasar. Thanks for your consideration!

The REORG TABLESPACE command reorganizes all data and all indexes tied to it.

Txs!
Maidy
Quasar Chunawala
Registered Member
Posts: 34
Joined: Sun Aug 11, 2013 4:48 pm
Location: Pune

Re: Reorg tables

Post by Quasar Chunawala »

Yes indeed! Cool. :)
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”