在执行dropping table 和loading table后,分别使用update statistics table和update statistics,为什么后一个的执行时间短于前一个呢?在DBMaster中这两种处理方法是不同的吗?执行update statistics 时,除了systablespace的数据之外,还有别的systemcatalog 被更新吗?

~ 0 min
2016-02-23 04:19

update statistics update statistics table处理方法是不同的。因为update statistics将会更新所有的表的字段,索引等等。所以为了节约资源,当累积一定数量的数据时它才更新统计。结果,用户会觉得update statistics节约时间。

用户可以使用以下语法强迫DBMaster更新所有统计:

update statistics sample=100

update statistics将更新表,字段,索引。所以所有包括这些的系统表都将被更新。

平均分: 0 (0 投票)

你不能对该内容发表评论

标签