- 最后登录
- 2016-4-27
- 在线时间
- 84 小时
- 威望
- 87
- 金钱
- 846
- 注册时间
- 2012-2-22
- 阅读权限
- 50
- 帖子
- 101
- 精华
- 1
- 积分
- 87
- UID
- 253
|
7#
发表于 2012-2-23 15:33:54
SQL> alter system set cursor_sharing=force;
System altered.
SQL> conn anbob/anbob;
Connected.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------------------------------------------------------------------ --------------------- ----------
TESTCUR TABLE
SQL> desc testcur;
Name Null? Type
----------------------------------------------------------------------------------- -------- --------------------------------------------------------
ID NUMBER(38)
NAME VARCHAR2(20)
SQL> insert into testcur values(100,'jack');
1 row created.
SQL> insert into testcur values(200,'jack');
1 row created.
SQL> insert into testcur values(200,'jack');
1 row created.
SQL> commit;
Commit complete.
SQL> conn system/oracle
Connected.
SQL> col sql_text for a100
SQL> set linesize 150
SQL> select sql_text,hash_value,parse_calls from v$sqlarea
2 where sql_text like 'insert into testcur%';
SQL_TEXT HASH_VALUE PARSE_CALLS
---------------------------------------------------------------------------------------------------- ---------- -----------
insert into testcur values(:"SYS_B_0",:"SYS_B_1") 2665047097 1
insert into testcur values(:"SYS_B_0",:"SYS_B_1")
即使sql 是不一样的, 它的字面量就应该是在启用了force 后用 SYS_B 代替吧? |
|