原帖由 dingjun123 于 2011-4-25 11:16 发表
你的计划呢?
完整的sql
select *from sjcj_rydjbxx r where r.rdj_sfzc='0' and r.rdj_sfyx='1'
and r.fwzjbxxdjb_fwzbh is not null and instr(rzf_xzdxxdz,'地下')>0;
执行计划怎么查看?
SQL> explain plan for
2select count(*) from sjcj_rydjbxx r where r.rdj_sfzc='0' and r.rdj_sfyx='1' and r.fwzjbxxdjb_fw
zbh is not null
3and instr(rzf_xzdxxdz,'地下')>0;
已解释。
SQL>
怎么没结果。。。
原帖由 dingjun123 于 2011-4-25 11:43 发表
sqlplus里,set autotrace traceonly,然后执行sql,弄出来
SQL> select * from sjcj_rydjbxx r where r.rdj_sfzc='0' and r.rdj_sfyx='1' and r.fwzjbxxdjb_fwzbh is
not null
2and instr(rzf_xzdxxdz,'地下')>0;
已选择350703行。
执行计划
----------------------------------------------------------
----------------------------------------------------------------------------------------------------
| Id| Operation
| Name
| Rows| Bytes | Cost (%CPU)| Pstart| Pstop |
----------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT
|
| 369K| 243M|9621 (1)| | |
| 1 |TABLE ACCESS BY GLOBAL INDEX ROWID| SJCJ_RYDJBXX | 369K| 243M|9621 (1)| ROWID | R
| 2 | INDEX RANGE SCAN
| INDEX_RYDJBXX_DXKJCX | 67744 | | 166 (2)| | |
----------------------------------------------------------------------------------------------------
Note
-----
- 'PLAN_TABLE' is old version