有关oracle external table的一点测试。

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>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/19602/viewspace-2158803/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/19602/viewspace-2158803/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值