Did you know that you can run DB2 REORGCHK command to update the statistics on the tables? Normally, you would run RUNSTATS command against each table to update the statistics. Consider using REORGCHK as shown below:

  • To update all the user and system tables use:
  • REORGCHK UPDATE STATISTICS ON TABLE ALL
  • To update all the tables of a particular schema use:
  • REORGCHK UPDATE STATISTICS on SCHEMA schema_name
  • To update all the tables of a particular table system use:
  • REORGCHK UPDATE STATISTICS on TABLE SYSTEM