[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);
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2856382/ ,如需转载,请注明出处,否则将追究法律责任。