Query optimization question
Summary:
Processing is fast only when not filtering by wlf_assignment_records_f.COMPLETION_DATE
Content (please ensure you mask any confidential information):
I have a learning report. It runs fast but when I add this condition about completion date (wlf_assignment_records_f.COMPLETION_DATE) it goes in timeout:
and ((:pCompletionDateFrom is null and :pCompletionDateTo is null)
or (warf.COMPLETION_DATE between nvl(:pCompletionDateFrom, to_date('01/01/1900', 'dd/mm/yyyy')) and nvl(:pCompletionDateTo, to_date('31/12/4712', 'dd/mm/yyyy'))))
This condition is added in where clause. Do you know what's going on here? Without it it runs in a few minutes, with it it runs for more than 1h and it fails.
Tagged:
0