"Sam Durai" <re***********@gmail.comwrote in message
news:11**********************@h3g2000cwc.googlegro ups.com...
Thanks for the response. Is it required only if there is frequent
change in DDL or do we need to run it on stable systems(No change in
DDL only data gets added to table) as well ?
Please advice
Reorgs are never "required." Once the schema is defined, and runstats has
been run, then you don't need to keep reorging the catalog. But after a big
schema change, you should probably run the reorgs/runstats twice, because
the first time you run runstats, additional rows may be added to the
catalog.
If you have a scheduled maintenance window, then an offline (classic)
catalog reorg is not a problem and costs little (very few DB2 LUW systems
use job accounting to chargeback the costs to a user). Some catalog tables
cannot be reorged online, and you will just get an error message when you
try it.
The real trick is to figure out what index to use when reorging the catalog
(or any table). For any reorg, you should usually select an index to use in
this order:
1. Clustering index
2. Primary Key index
3. Unique Index
4. First index on the table
5. No index clause (if you got this far down the list, then no index exists)