If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 reorg what info we can check before & after to justify if it helped

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-09-10, 00:48
ranjandba ranjandba is offline
Registered User
 
Join Date: Mar 2006
Posts: 20
db2 reorg what info we can check before & after to justify if it helped

i've 3 tables where 4 million rows deleted , to regain the pseudo deleted rows etc i think there is a need to reorg the table

can any one let me know if my ablve & below understanding is correct

per the info in ibm link i need to run reorgchk if the out put in the last column reorg shows a (*) star mark i need to go for reorg for that table.

my question is after running reorg next time if i run reorg the orgchk again showing * .

is there any other parameter / information i can check to know if the orgchk have helped. ie before & after running the orgchk to justify if it helped?

thanka
Reply With Quote
  #2 (permalink)  
Old 06-09-10, 08:19
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Using reorg has 3 main advantages. First it will free up space that is no longer being used, It will fix all overflows (rows that had to be moved to another page due to data changes), and lastly it can order (cluster) the data based on some index.

If you have runstats done before and after the reorg, you should see differences in syscat.tables for NPAGES, FPAGES, and OVERFLOW columns for the table. For the clustering, you should see improvements in some queries.

Andy
Reply With Quote
  #3 (permalink)  
Old 06-09-10, 08:45
dbzTHEdinosaur dbzTHEdinosaur is offline
Registered User
 
Join Date: Jun 2007
Location: germany
Posts: 96
This article may be helpful: getting a handle on reorg
__________________
Dick Brenholtz, Ami in Deutschland
Reply With Quote
  #4 (permalink)  
Old 06-09-10, 16:55
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by dbzTHEdinosaur View Post
This article may be helpful:
...if you are discussing DB2 for mainframes.
Reply With Quote
  #5 (permalink)  
Old 06-13-10, 01:57
ranjandba ranjandba is offline
Registered User
 
Join Date: Mar 2006
Posts: 20
db2 9.1 reorg carification

Quote:
Originally Posted by ARWinner View Post
Using reorg has 3 main advantages. First it will free up space that is no longer being used, It will fix all overflows (rows that had to be moved to another page due to data changes), and lastly it can order (cluster) the data based on some index.

If you have runstats done before and after the reorg, you should see differences in syscat.tables for NPAGES, FPAGES, and OVERFLOW columns for the table. For the clustering, you should see improvements in some queries.

Andy
thanks for the reply -

i'm wondering if we take a backup restore the same db will take care of the above 3..? (may be my understanding is wrong..)....
if it wont take care of the above why ?
Reply With Quote
  #6 (permalink)  
Old 06-13-10, 16:29
goldfishhh goldfishhh is offline
Registered User
 
Join Date: Nov 2004
Posts: 54
Is there any other type?



Quote:
Originally Posted by n_i View Post
...if you are discussing DB2 for mainframes.
Reply With Quote
  #7 (permalink)  
Old 06-14-10, 08:01
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by ranjandba View Post
thanks for the reply -

i'm wondering if we take a backup restore the same db will take care of the above 3..? (may be my understanding is wrong..)....
if it wont take care of the above why ?
No, backup/restore will not do the same as reorg. All backup does is copy the database pages as they exist and write them to the backup image. All restore does is take that database pages as the exist in the backup image and lay them down in a database. Nothing really changes structurally with the pages. That is what reorg does.

Andy
Reply With Quote
  #8 (permalink)  
Old 06-14-10, 08:02
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
A backup/restore does not change anything in the data layout on the pages. It just creates/restores a copy. So if you take a backup before a REORG, you will restore the non-reorg'd database again.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On