我想测量oracle 11g数据库环境中sql语句(例如,一个简单的create或insert语句)的RAM使用率。
我试图使用dbms_space获取它,但似乎只获得了磁盘空间。
我还找到了这个网站:http://www.dba-oracle.com/m_memory_usage_percent.htm
但这句话
select
*
from
v$sql
where sql_text like {my table}
不要返回create语句。
发布于 2011-08-30 21:45:20
请参阅上面的评论:
select operation,
options,
object_name name,
trunc(bytes/1024/1024) "input(MB)",
trunc(last_memory_used/1024) last_mem,
trunc(estimated_optimal_size/1024) opt_mem,
trunc(estimated_onepass_size/1024) onepass_mem,
decode(optimal_executions, null, null,
optimal_executions||'/'||onepass_executions||'/'||
multipasses_executions) "O/1/M"
from v$sql_plan p
, v$sql_workarea w
where p.address=w.address(+)
and p.hash_value=w.hash_value(+)
and p.id=w.operation_id(+)
and p.address= ( select address
from v$sql
where sql_text like '%my_table%' )
https://stackoverflow.com/questions/7243907
复制相似问题