在Oracle 10g中可以通过以下3种方式查看dbms_stats默认选项值
1、查看dual表
[quote]SQL> select dbms_stats.get_param('cascade') from dual;
DBMS_STATS.GET_PARAM('CASCADE')
----------------------------------------------------------------------------
TRUE[/quote]
2、通过dbms_output存储过程
[quote]SQL>set serveroutput on
SQL> execute dbms_output.put_line(dbms_stats.get_param(pname => 'CASCADE'))
TRUE
PL/SQL 过程已成功完成。[/quote]
3、通过内部视图optstat_hist_control$
[quote]SQL> SELECT sname AS parameter, nvl(spare4,sval1) AS default_value
2 FROM sys.optstat_hist_control$
3 WHERE sname IN ('CASCADE','ESTIMATE_PERCENT','DEGREE','METHOD_OPT','NO_INVA
LIDATE','GRANULARITY');
PARAMETER
------------------------------
DEFAULT_VALUE
--------------------------------------------------------------------------------
CASCADE
TRUE
ESTIMATE_PERCENT
DBMS_STATS.AUTO_SAMPLE_SIZE
DEGREE
NULL
PARAMETER
------------------------------
DEFAULT_VALUE
--------------------------------------------------------------------------------
METHOD_OPT
FOR ALL COLUMNS SIZE AUTO
NO_INVALIDATE
DBMS_STATS.AUTO_INVALIDATE
GRANULARITY
AUTO
已选择6行。
[/quote]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=
以上记录,仅备忘
1、查看dual表
[quote]SQL> select dbms_stats.get_param('cascade') from dual;
DBMS_STATS.GET_PARAM('CASCADE')
----------------------------------------------------------------------------
TRUE[/quote]
2、通过dbms_output存储过程
[quote]SQL>set serveroutput on
SQL> execute dbms_output.put_line(dbms_stats.get_param(pname => 'CASCADE'))
TRUE
PL/SQL 过程已成功完成。[/quote]
3、通过内部视图optstat_hist_control$
[quote]SQL> SELECT sname AS parameter, nvl(spare4,sval1) AS default_value
2 FROM sys.optstat_hist_control$
3 WHERE sname IN ('CASCADE','ESTIMATE_PERCENT','DEGREE','METHOD_OPT','NO_INVA
LIDATE','GRANULARITY');
PARAMETER
------------------------------
DEFAULT_VALUE
--------------------------------------------------------------------------------
CASCADE
TRUE
ESTIMATE_PERCENT
DBMS_STATS.AUTO_SAMPLE_SIZE
DEGREE
NULL
PARAMETER
------------------------------
DEFAULT_VALUE
--------------------------------------------------------------------------------
METHOD_OPT
FOR ALL COLUMNS SIZE AUTO
NO_INVALIDATE
DBMS_STATS.AUTO_INVALIDATE
GRANULARITY
AUTO
已选择6行。
[/quote]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=
以上记录,仅备忘