ITPub博客

首页 > 数据库 > Oracle > 如何确认一条语句在sharepool中是否存在?

如何确认一条语句在sharepool中是否存在?

原创 Oracle 作者:531968912 时间:2016-08-13 12:37:38 0 删除 编辑
SQL> select /* 我在shared_pool中吗*/ 1 from dual;

1
----------
1


SQL> select sql_text from v$sqlarea where sqL_text like '%shared_pool%' and sql_text not like '%v$sqlarea%'
2 ;

SQL_TEXT
--------------------------------------------------------------------------------------------------------------------------------------------
select /* 我在shared_pool中吗*/ 1 from dual


在v$sqlarea中 用sql_text 匹配到你的SQL,说明你的SQL有父游标parent cursor 在shared pool中



SQL> select sql_text from v$sql where sqL_text like '%shared_pool%' and sql_text not like '%v$sqlarea%'
2 ;

SQL_TEXT
--------------------------------------------------------------------------------------------------------------------------------------------
select /* 我在shared_pool中吗*/ 1 from dual

在V$SQL中用sql_text 匹配到你的SQL,说明你的SQL有子游标在shared pool中

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25462274/viewspace-2123429/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-09-24

  • 博文量
    576
  • 访问量
    1111454