软软解析之缓存游标的迷惑-----已解决!
今天上课讲软软解析时,使用了缓存游标,在实验时有个迷惑:
我把缓存游标设为0,具体操作如下:
gyj@OCM> select * from gyj100 where id=1; ID NAME---------- -------------------------------------------------- 1 gyj1gyj@OCM> select * from gyj100 where id=1; ID NAME---------- -------------------------------------------------- 1 gyj1gyj@OCM> select * from gyj100 where id=1; ID NAME---------- -------------------------------------------------- 1 gyj1sys@OCM> 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---------------- ---------- ------------------------------ ---------------- ---------- ------------- ------------------------------------------------------------ ------------ ----------- ----------------------------------------------------------------0000000076848DB8 142 GYJ 000000006F8CF9F0 3279472569 amavkw71rjjxt select * from gyj100 where id=1 DICTIONARY LOOKUP CURSOR CACHEDyj@OCM> select * from gyj100 where id=2; ID NAME---------- -------------------------------------------------- 2 gyj2sys@OCM> 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---------------- ---------- ------------------------------ ---------------- ---------- ------------- ------------------------------------------------------------ ------------ ----------- ----------------------------------------------------------------0000000076848DB8 142 GYJ 000000006F899AA8 797053639 389005srs44q7 select * from gyj100 where id=2 OPEN0000000076848DB8 142 GYJ 000000006F8CF9F0 3279472569 amavkw71rjjxt select * from gyj100 where id=1 SESSION CURSOR CACHED