Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2006
    Posts
    20

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  3. #3
    Join Date
    Jun 2007
    Location
    germany
    Posts
    155
    This article may be helpful: getting a handle on reorg
    Dick Brenholtz, Ami in Deutschland

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by dbzTHEdinosaur View Post
    This article may be helpful:
    ...if you are discussing DB2 for mainframes.

  5. #5
    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 ?

  6. #6
    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.

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  8. #8
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •