zoukankan      html  css  js  c++  java
  • v$sqlarea 之LAST_ACTIVE_TIME

    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
    

  • 相关阅读:
    mysql 常用函数
    JSP 分页代码
    day15(Mysql学习)
    day14(编码实战-用户登录注册)
    Bootstrap第3天
    Bootstrap第2天
    Bootstrap 第一天
    day13(JSTL和自定义标签&MVC模型&javaweb三层框架)
    label 对齐
    Alert提示框之后跳转指定页面
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13352043.html
Copyright © 2011-2022 走看看