How to get the maximum space used in TEMP during process execution

  • From: Eriovaldo Andrietta <ecandrietta@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Sun, 2 Nov 2014 07:19:59 -0200

Hello,

I would like to know if this way is correct. If no, what is the correct way
to get the maximum space used during a process execution.

I am doing it:

begin
  dbms_application_info.set_module(module_name => 'MY_PROCESS_001'
                                  ,action_name => '');
end;
/

then I execute the process:
select * from ...
update table set ...
delete table ...
exec procedure ....

at final I do:

select max(temp_space_allocated/1024/1024) TEMP_MB
  from v$active_session_history
 where module = 'MY_PROCESS_001';

The result of this query is the maximum space quantity used in TEMP during
all the time.  Is it correct ?

Is there another way to do it ?

Regards
Eriovaldo

Other related posts: