如何获取oracle11g数据库中进程的RAM使用情况?

发布于 2024-12-02 00:11:37 字数 241 浏览 6 评论 0原文

我想测量oracle 11g 数据库环境中sql 语句(例如简单的create 或insert 语句)的RAM 使用情况。

我尝试使用 dbms_space 来获取它,但似乎只能获取磁盘空间。

我还找到了这个网站: 没有

声明

select
*
from
v$sql
where sql_text like {my table}

但是 返回创建语句。

I want to measure the RAM usage of an sql statement (e.g. a simple create or insert statement) in an oracle 11g database environment.

I tried to get it by using dbms_space, but it seems like that only gets the disk space.

I also found this site:
http://www.dba-oracle.com/m_memory_usage_percent.htm

But the statement

select
*
from
v$sql
where sql_text like {my table}

dont return the create statement.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酷遇一生 2024-12-09 00:11:37

请参阅上面的评论:

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%' )

See comment above:

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%' )
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文