Joined: 19 Mar 2009 Posts: 184 Location: Globe, India
After the completion of every RUNSTATS statement, you should execute an explicit COMMIT WORK. The COMMIT releases locks and avoids filling up the log when gathering statistics on multiple tables.
Rebind packages containing static SQL using the BIND command, or the REBIND command (and optionally re-explain their statements) after collecting statistics with RUNSTATS. The db2rbind command can be used to rebind all packages in the database. Use the FLUSH PACKAGE command to remove all cached dynamic SQL statements currently in the package cache and force the next request to be implicitly compiled.