[20211206]分析表取样最小大小是多少.txt
--//别人问的问题,很容易测试出来。
1.环境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.测试:
SCOTT@book> execute sys.dbms_stats.gather_table_stats ( OwnName => user,TabName => 'dept',Estimate_Percent => 0.00000000001);
BEGIN sys.dbms_stats.gather_table_stats ( OwnName => user,TabName => 'dept',Estimate_Percent => 0.00000000001); END;
*
ERROR at line 1:
ORA-20001: Illegal sample percent .00000000001: must be in the range [0.000001,100]
ORA-06512: at "SYS.DBMS_STATS", line 24281
ORA-06512: at "SYS.DBMS_STATS", line 24332
ORA-06512: at line 1
--//最小也就是1e-6.实际上你设置很小的取样,实际取样还是可能不同的。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2846029/ ,如需转载,请注明出处,否则将追究法律责任。