- SQL*Plus: Release 11.2.0.1.0 Production on 星期四 5月 27 14:40:51 2010
- Copyright (c) 1982, 2010, Oracle.All rights reserved.
- SQL> conn test/test
- 已连接。
- SQL> select t.PARSE_CALLS,t.EXECUTIONS from v$sql t where t.SQL_TEXT='select 1 from dual';
- 未选定行
- SQL> declare
- 2 i pls_integer;
- 3 nCur pls_integer;
- 4begin
- 5 nCur := dbms_sql.open_cursor;
- 6
- 7 for i in 0..10000 loop
- 8 dbms_sql.parse(nCur,'select 1 from dual',dbms_sql.native);
- 9 end loop;
- 10
- 11 dbms_sql.close_cursor(nCur);
- 12end;
- 13/
- PL/SQL 过程已成功完成。
- SQL> select t.PARSE_CALLS,t.EXECUTIONS from v$sql t where t.SQL_TEXT='select 1 from dual';
- PARSE_CALLS EXECUTIONS
- ----------- ----------
- 20002 0
通常是某些database driver的奇异功能导致的,比如它需要通过parse某个SQL来获取数据表结构的描述或者其它的一些什么信息,这种情况下就是只有parse而没有execute,并且parse值极高。
通常是ODBC,通常SQL Module是w3wp.exe,如果你也是,恭喜你