2011-08-30 3 views
2

oracle 11g 데이터베이스 환경에서 SQL 문 (예 : 간단한 작성 또는 삽입 문)의 RAM 사용량을 측정하고자합니다.oracle11g 데이터베이스에서 프로세스의 RAM 사용을 어떻게 얻을 수 있습니까?

dbms_space를 사용하여 가져 오려고했으나 디스크 공간 만 가져 오는 것으로 보입니다. http://www.dba-oracle.com/m_memory_usage_percent.htm

그러나 CREATE 문을 반환 해달라고 문

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

:

나는이 사이트를 발견했다. 위의

+0

링크가 (http://www.dba-oracle.com/m_memory_usage_percent.htm [오라클의 실행 계획 작업을위한 RAM보기]). – Ben

답변

2

참조 코멘트 : 해당 페이지의 상단에

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

작동하지 않습니다 : ORA-01427, 부속 조회가 둘 이상의 행을 리턴합니다. 게다가 내가 찾고있는 create 문과 insert 문은 v $ sql에 없다. – Hauke

+0

오, 거기에 오타가 있습니다 multipasses_exections -> multipasses_executions – Hauke

+0

@ Hauke, thanks; 오타가 수정되었습니다. 두 개 이상의 행을 반환하는 하위 쿼리는 v $ sql에 테이블 이름이 포함 된 목록이 두 개 이상 있음을 의미합니다. 좀 더 구체적이어야합니다. – Ben

관련 문제