Wednesday, 17 July 2013

Oracle Concurrent Request Tuning

-- List of concurrent request which ran more than given number of minutes.
-- Useful to point the high load request and get it tunes.
-- Give minimum number of minutes as parameter.
select  fcr.request_id request_id,
           trunc(((fcr.actual_completion_date - fcr.actual_start_date)
           /(1 / 24)) * 60) exec_time,
           fcr.actual_start_date start_date,
           fcp.concurrent_program_name conc_prog,
           fcpt.user_concurrent_program_name user_conc_prog
from    fnd_concurrent_programs fcp,
           fnd_concurrent_programs_tl fcpt,
           fnd_concurrent_requests fcr
where  trunc(((fcr.actual_completion_date - fcr.actual_start_date)
            /(1 / 24)) * 60) > nvl('&min', 45)
and     fcr.request_id = &request_id
and     fcr.concurrent_program_id = fcp.concurrent_program_id
and     fcr.program_application_id = fcp.application_id
and     fcr.concurrent_program_id = fcpt.concurrent_program_id
and     fcr.program_application_id = fcpt.application_id
and     fcpt.language = userenv('lang')
order by trunc(((fcr.actual_completion_date - fcr.actual_start_date) /(1 / 24)) * 60) desc;

No comments:

Post a Comment