In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
SELECT
fcr.request_id,
DECODE(fcpt.user_concurrent_program_name,
'Report Set',
fcr.description,
'Request Set Stage',
fcr.description,
fcpt.user_concurrent_program_name) user_concurrent_program_name,
fcr.description,
fcr.argument_text,
fcr.concurrent_program_id,
fcr.parent_request_id,
fcr.actual_start_date,
fcr.actual_completion_date,
ROUND((fcr.actual_completion_date - fcr.actual_start_date) * 24 * 60,
4) runtime,
DECODE(fcr.phase_code,
'C',
'No Schedule') program_status,
fu.user_name,
frt.responsibility_name,
fcr.logfile_name
FROM
[email protected]_link fcr,
[email protected]_link fcpt,
[email protected]_link fu,
[email protected]_link frt
WHERE
fcr.concurrent_program_id = fcpt.concurrent_program_id
AND fcr.requested_by = fu.user_id
AND fcr.responsibility_id = frt.responsibility_id
AND fcr.responsibility_application_id = frt.application_id
AND fcr.phase_code = 'C'
AND fcr.status_code IN (
'C', 'G', 'E', 'X'
)
AND fcr.actual_completion_date >= SYSDATE - 1 / 24
AND fcr.requested_by = 1508715
AND fcr.request_id NOT IN (
SELECT
[email protected]_link.parent_request_id
FROM
[email protected]_link
)