Recently executed SQL not in V$SQL

独自空忆成欢 提交于 2021-02-19 02:22:45

问题


Under what circumstances does a select query not appear in the V$SQL view?

For example, if I run this:

select /*findme*/ * from T ...

And then immediately afterward run this:

select * from v$sql where sql_text like '%/*findme*/%';

Under what circumstances would I get no rows returned? And under those circumstances can I force a query's info to be recorded in V$SQL?


回答1:


Under what circumstances does a select query not appear in the V$SQL view?

One situation is on a Real Application Cluster (RAC). In such environments, V$SQL will only contain the library cache of the current node. To see the library cache across all nodes, select from GV$SQL.



来源:https://stackoverflow.com/questions/40114515/recently-executed-sql-not-in-vsql

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!