LAST_ACTIVE_TIME;query plan上次active的时间
PARSING_SCHEMA_NAME: parse child cursor的用户
SQL> select 'zyj' from dual;
'ZY
---
zyj
SQL> select sql_text, parsing_schema_name, last_active_time
from v$sqlarea
where parsing_schema_name = 'TEST'
and SQL_TEXT like '%zyj%' 2 3 4 ;
SQL_TEXT
--------------------------------------------------------------------------------
PARSING_SCHEMA_NAME LAST_ACTIVE_TIME
------------------------------ -------------------
select 'zyj' from dual
TEST 2014-10-22 14:40:34
select sql_text, parsing_schema_name, last_active_time from v$sqlarea where p
arsing_schema_name = 'TEST' and SQL_TEXT like '%zyj%'
TEST 2014-10-22 14:40:49
再次执行:
SQL> select sql_text, parsing_schema_name, last_active_time
from v$sqlarea
where parsing_schema_name = 'TEST'
and SQL_TEXT like '%zyj%' 2 3 4 ;
SQL_TEXT
--------------------------------------------------------------------------------
PARSING_SCHEMA_NAME LAST_ACTIVE_TIME
------------------------------ -------------------
select 'zyj' from dual
TEST 2014-10-22 14:44:04
select sql_text, parsing_schema_name, last_active_time from v$sqlarea where p
arsing_schema_name = 'TEST' and SQL_TEXT like '%zyj%'
TEST 2014-10-22 14:40:49
清空shared pool,再次执行
SQL> select sql_text, parsing_schema_name, last_active_time
from v$sqlarea
where parsing_schema_name = 'TEST'
and SQL_TEXT like '%zyj%' 2 3 4 ;
SQL_TEXT PARSING_SCHEMA_NAME LAST_ACTIVE_TIME
-------------------------------------------------- ------------------------------ -------------------
select sql_text, parsing_schema_name, last_active_ TEST 2014-10-22 14:46:31
time from v$sqlarea where parsing_schema_name =
'TEST' and SQL_TEXT like '%zyj%'
select 'zyj' from dual TEST 2014-10-22 14:45:55