10. Which two are true about Oracle's Optimizer statistics?
A) They are automatically updated when ddl statements execute.
B) They can be calculated exactly .
C) They can be gathered on external tables.
D) They are automatically updated when dml statements execute.
E) They can be estimated.
Answer: BE
--======================= SQL> create table alert_log_external 2 (line varchar2(4000) ) --创建的外部表的列,可以根据需求写 3 organization external --固定语法 4 (type oracle_loader 5 default directory DATA_PUMP_DIR 6 access parameters ( 7 records delimited by newline 8 nobadfile 9 nologfile 10 nodiscardfile 11 --fields terminated by ; --遇到;符号时终止 12 missing field values are null --缺失部分为空 13 (line) 14 ) 15 location ( 'alert_test.log') )--name_alert为数据文件名 16 reject limit unlimited; 表已创建。 SQL> exec dbms_stats.gather_table_stats('XYS','ALERT_LOG_EXTERNAL'); BEGIN dbms_stats.gather_table_stats('XYS','ALERT_LOG_EXTERNAL'); END; * 第 1 行出现错误: ORA-20000: Unable to analyze TABLE "XYS"."ALERT_LOG_EXTERNAL", sampling on external table is not supported ORA-06512: 在 "SYS.DBMS_STATS", line 20337 ORA-06512: 在 "SYS.DBMS_STATS", line 20360 ORA-06512: 在 line 1 SQL> create index idx1 on ALERT_LOG_EXTERNAL(line); create index idx1 on ALERT_LOG_EXTERNAL(line) * 第 1 行出现错误: ORA-30657: 操作在外部组织表上不受支持 SQL>
