Is there a coded sql I can use to identify tables those need reorgs based on the criteria that I would want to choose rather than the default criteria from the db2 reorgchk command.
F4: CLUSTERRATIO or normalized CLUSTERFACTOR > 80
F5: 100 * (Space used on leaf pages / Space available on non-empty leaf pages) > MIN(50, (100 - PCTFREE))
F6: (100 - PCTFREE) * (Amount of space available in an index with one less level / Amount of space required for all keys) < 100
F7: 100 * (Number of pseudo-deleted RIDs / Total number of RIDs) < 20
F8: 100 * (Number of pseudo-empty leaf pages / Total number of leaf pages) < 20
F1: 100 * OVERFLOW / CARD < 5
F2: 100 * (Effective Space Utilization of Data Pages) > 70
F3: 100 * (Required Pages / Total Pages) > 80
Does any one know how long the session.tb_stats remain after sysproc.reorg_chk proc is run
.. Also can we run reorg right after running sysproc.reorg_chk or do we need to give some time for tb_stats to be built with the list before for the actual reorgs are run
The session table, like any other session table will remain around until either the connection issues a DROP for it, or the connection terminates. You can run REORG right after calling the stored procedure, but you can actually run it at any time. The two things are totally separate from each other.