Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    306

    Unanswered: REORGCHK/RUNSTATS and REORG

    DB2 8.2 on AIX 5.3

    Hey there,

    I'm attempting to get the stats up to date and the data REORGed on some fairly large systems (+30k tables, 30-160GB DBs).

    I've tried REORGCHK with update statistics and also creating a script that does a RUNSTATS with distribution and detailed indexes all.
    This has left me with a few questions....

    Does the REORCHK update statistics update the statistics information in the syscat tables? (I checked for example the TABLES.STATS_TIME and it seems not updated)

    How come a RUNSTATS followed by a REORGCHK current Statistics takes about 2 hours whereas a REORGCHK update statistics take 6-7 hours?!?

    Beyond that....

    After doing a REORGCHK update statistics I went on to run REORGs ...
    For all tables which had a * in F1-3 I ran a
    REORG table <taname> allow read access
    For tables/indexes with a * in F4-6 I ran
    reorg indexes all for table <tabname> allow read access
    For tables/indexes with a * in F7 I ran
    reorg indexes all for table <tabname> allow write access cleanup only
    and for tables/indexes with a * in F8 I ran
    reorg indexes all for table <tabname> allow write access cleanup only pages

    Now if I run a REORGCHK with update stats again I still have HUNDREDS of tables/indexes with *... Is this normal?
    The way it seems to me is that some index REORGs "undo" table reorgs, is this correct?
    Is there a suggested order or method that I'm not following?

    Cheers

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    You can influence whether REORGCHK updates statistics or not. The default is to do the update:
    http://publib.boulder.ibm.com/infoce...63%68%6b%22%20

    As for the "*" in the output of REORGCHK, you may still see some of them after the reorg because not all conditions can be met all the time. For example, a table can usually only be clustered by 1 index. All other indexes will not be clustered! But it's hard to tell because you didn't provide some sample output from your REORGCHK and the accompanying REORG commands.
    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
  •