日期:2014-05-16 浏览次数:20445 次
我把缓存游标设为0,具体操作如下:
sys@OCM> show parameter session_cached_cursors NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ session_cached_cursors integer 0
会话13上执行SQL语句
gyj@OCM> select sid from v$mystat where rownum=1; SID ---------- 13 gyj@OCM> select * from gyj100 where id=1; ID NAME ---------- -------------------------------------------------- 1 gyj1
sys@OCM> select sid from v$mystat where rownum=1; SID ---------- 125 sys@OCM> select * from v$open_cursor where sql_text like '%select * from gyj100 where id=%'; SADDR SID USER_NAME ADDRESS HASH_VALUE SQL_ID SQL_TEXT LAST_SQL_ACT SQL_EXEC_ID CURSOR_TYPE ---------------- ---------- ------------------------------ ---------------- ---------- ------------- ------------------------------------------------------------ ------------ ----------- ---------------------------------------------------------------- 0000000076EB4F18 13 GYJ 000000006FE37970 3279472569 amavkw71rjjxt select * from gyj100 where id=1 OPEN
gyj@OCM> select * from gyj100 where id=2; ID NAME ---------- -------------------------------------------------- 2 gyj2 gyj@OCM> select * from v$open_cursor where sql_text like '%select * from gyj100 where id=%'; SADDR SID USER_NAME ADDRESS HASH_VALUE SQL_ID SQL_TEXT LAST_SQL_ACT SQL_EXEC_ID CURSOR_TYPE ---------------- ---------- ------------------------------ ---------------- ---------- ------------- ------------------------------------------------------------ ------------ ----------- ---------------------------------------------------------------- 0000000076851CB0 139 GYJ 000000006DCAC688 797053639 389005srs44q7 select * from gyj100 where id=2 OPEN gyj@OCM> select * from gyj100 where id=3; ID NAME ---------- -------------------------------------------------- 3 gyj3 yj@OCM> select * from gyj100 where id=3; ID NAME ---------- -------------------------------------------------- 3 gyj3 gyj@OCM> select * from gyj100 where id=3; ID NAME ---------- -------------------------------------------------- 3 gyj3 gyj@OCM> select * from gyj100 where id=3; ID NAME ---------- -------------------------------------------------- 3 gyj3 gyj@OCM> select * from gyj100 where id=3; ID NAME ---------- -------------------------------------------------- 3 gyj3 sys@OCM> select * from v$open_cursor where sql_text like '%select * from gyj100 where id=%'; SADDR SID USER_NAME ADDRESS HASH_VALUE SQL_ID SQL_TEXT LAST_SQL_ACT SQL_EXEC_ID CURSOR_TYPE ---------------- ---------- ------------------------------ ---------------- ---------- ------------- ------------------------------------------------------------ ------------ ----------- ---------------------------------------------------------------- 0000000076851CB0 139 GYJ 000000006DC3BF10 3087917848 gq623zuw0vsss select * from gyj100 where id=3 OPEN gyj@OCM> select * from gyj100 where id=4; ID NAME ---------- -------------------------------------------------- 4 gyj4 sys@OCM> s