Thread: REORGCHK/RUNSTATS and REORG
02-01-07, 19:39 #1Registered User
- Join Date
- Jul 2004
Unanswered: REORGCHK/RUNSTATS and REORG
DB2 8.2 on AIX 5.3
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?!?
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?
02-02-07, 03:54 #2Registered User
- Join Date
- Jan 2007
- Jena, Germany
You can influence whether REORGCHK updates statistics or not. The default is to do the update:
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