[English]
作者:
fuyuncat
来源:
www.HelloDBA.com
Bug不难重新,以下语句可以重现该bug。
重点是,
- 表中有一个运行为空的字段
- 该字段中存在空值和非空值
- 该字段的统计数据被收集过
SQL代码
- HelloDBA.COM:dbat1:> rsqlplus / as sysdba
- SQL*Plus: Release 12.2.0.1.0 Production on Fri May 26 09:00:44 2017
- Copyright (c) 1982, 2016, Oracle. All rights reserved.
- Connected to:
- Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
- HelloDBA.COM> drop table tt1;
- Table dropped.
- HelloDBA.COM> create table tt1 (c1 number, c2 date);
- Table created.
- HelloDBA.COM> insert into tt1 values(1, sysdate);
- 1 row created.
- HelloDBA.COM> insert into tt1 values(1, null);
- 1 row created.
- HelloDBA.COM> commit;
- Commit complete.
- HelloDBA.COM> exec dbms_stats.gather_table_stats('SYS', 'TT1', METHOD_OPT=>'for all columns');
- PL/SQL procedure successfully completed.
- explain plan for
- txo as (select distinct c1
- from ut ,
- dual),
- with
- ut as (select c1
- from tt1
- where nvl (c2 ,
- trunc (sysdate ) ) >= trunc (sysdate ) ),
- txo as (select distinct c1
- from ut ,
- dual),
- u as (select * from ut)
- select *
- from u ,
- txo
- 14 ;
- explain plan for
- *
- ERROR at line 1:
- ORA-03113: end-of-file on communication channel
- Process ID: 69693
- Session ID: 662 Serial number: 29873
上一篇:Oracle 12c 新SQL提示 | 下一篇: |
本类中的所有文章 |