随笔-25  评论-6  文章-0  trackbacks-0
Abstract
When you update table statistics using the RUNSTATS command, it requires that you run the command against each table, one by one. REORGCHK gives you the capability to update the statistics of a group of tables or all the tables in the database, with only one command.
.
Contents
_
DB2 UDB uses the statistics information in the catalog table to derive the best access plan. The DBA should regularly run the RUNSTATS command to keep the database statistics updated. This procedure will ensure the best performance on queries.

If you want to update statistics on all the tables or a group of tables in the database, you can use the REORGCHK command with the UPDATE STATISTICS option. This would be run instead of running the RUNSTATS command against each table. The UPDATE STATISTICS option will first call the RUNSTATS routine to update the table statistic. You can then use these new statistics to determine if a reorg is needed.

The REORGCHK command allows you to update statistics on a group of tables with one command.

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
posted on 2006-06-23 15:19 MyJavaWorld 阅读(471) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: