DB2 Runstats的用法

####只收集表的统计信息
只收集表的统计信息,但是不是详细统计信息
$ db2 runstats on table STORE
DB20000I  The RUNSTATS command completed successfully.
$
只收集表的详细统计信息
$ db2 runstats on table STORE with distribution
DB20000I  The RUNSTATS command completed successfully.
$
####只收集索引的统计信息
只收集表STORE上所有索引的统计信息
$ db2 runstats on table STORE for indexes all
DB20000I  The RUNSTATS command completed successfully.
$ db2 runstats on table STORE for detailed indexes all
DB20000I  The RUNSTATS command completed successfully.

只收集表上的索引SYSIBM.SQL161227190122070的基本统计信息
$ db2 runstats on table STORE for index SYSIBM.SQL161227190122070
DB20000I  The RUNSTATS command completed successfully.

只收集表上的索引SYSIBM.SQL161227190122070的详细统计信息
$ db2 runstats on table STORE for detailed index SYSIBM.SQL161227190122070
DB20000I  The RUNSTATS command completed successfully.
$
####收集表和索引的统计信息
收集表和表上所有索引的基本统计信息
$ db2 runstats on table STORE and indexes all
DB20000I  The RUNSTATS command completed successfully.
收集表和表上指定索引的基本统计信息
$ db2 runstats on table STORE and index SYSIBM.SQL161227190122070
DB20000I  The RUNSTATS command completed successfully.
收集表的基本统计信息和表上指定索引的详细统计信息
$ db2 runstats on table STORE and detailed index SYSIBM.SQL161227190122070
DB20000I  The RUNSTATS command completed successfully.
收集表的详细统计信息和表上指定索引的基本统计信息
$ db2 runstats on table STORE with distribution and index SYSIBM.SQL161227190122070
DB20000I  The RUNSTATS command completed successfully.
收集表的详细统计信息表上所有索引的基本统计信息
$ db2 runstats on table STORE with distribution and indexes all
DB20000I  The RUNSTATS command completed successfully.
收集表的详细统计信息和表上所有索引的详细统计信息
$ db2 runstats on table STORE with distribution and detailed indexes all
DB20000I  The RUNSTATS command completed successfully.
$
请使用浏览器的分享功能分享到微信等