[20220217]完善tpt gts.sql脚本.txt

来源:这里教程网 时间:2026-03-03 17:28:09 作者:

[20220217]完善tpt gts.sql脚本.txt --//有时候不小心使用gts分析生产系统的表,选择FOR TABLE FOR ALL COLUMNS SIZE 1,导致直方图消失.修改采用repeat,这样更加安全 --//一些. --//method_opt=>'FOR TABLE FOR ALL COLUMNS SIZE 1'为method_opt=>'FOR TABLE FOR ALL COLUMNS SIZE REPEAT'. -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. prompt Gather Table Statistics for table &1.... exec dbms_stats.gather_table_stats(null, upper('&1'), null, method_opt=>'FOR TABLE FOR ALL COLUMNS SIZE REPEAT', cascade=>true, no_invalidate=>false);

相关推荐