Plan missing from cursor cache [message #627205] |
Sun, 09 November 2014 02:17 |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
Hello folks ,
I was doing a test an I was expecting to see two plans for the same SQL_ID , but i see only the recent . Any idea why ?
SQL> select /*+ id=1000 */ name from EMP where id=1000;
NAME
----------
someone
SQL> select sql_id, sql_text, hash_value, plan_hash_value
from v$sql
where sql_id='d27s4gw6xfp7s'; 2 3
SQL_ID
-------------
SQL_TEXT
----------------------------------------------------------------------------------------------------------------------------------
HASH_VALUE PLAN_HASH_VALUE
---------- ---------------
d27s4gw6xfp7s
select /*+ id=1000 */ name from EMP where id=1000
232215800 3956160932
SQL> CREATE INDEX IX_ID on EMP(id);
Index created.
SQL> select /*+ id=1000 */ name from EMP where id=1000;
NAME
----------
someone
SQL> select sql_id, sql_text, hash_value, plan_hash_value
from v$sql
where sql_id='d27s4gw6xfp7s'; 2 3
SQL_ID
-------------
SQL_TEXT
----------------------------------------------------------------------------------------------------------------------------------
HASH_VALUE PLAN_HASH_VALUE
---------- ---------------
d27s4gw6xfp7s
select /*+ id=1000 */ name from EMP where id=1000
232215800 2086888443
|
|
|
|
|