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

  • From: kyle Hailey <kylelf@xxxxxxxxx>
  • To: Eriovaldo Andrietta <ecandrietta@xxxxxxxxx>
  • Date: Tue, 4 Nov 2014 08:38:04 -0800

If you are on 11.2+ you can check out TEMP_SPACE_ALLOCATED in
v$active_session_history.

 TEMP_SPACE_ALLOCATED - Amount of TEMP memory (in bytes) consumed by this
session at the time this sample was taken


I haven't had a chance to play with it much but it sounds pretty good for
tracking temp space usage as a session does work.



- Kyle


On Sun, Nov 2, 2014 at 1:19 AM, Eriovaldo Andrietta <ecandrietta@xxxxxxxxx>
wrote:

> 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: