Hi Experts,
Using a custom feedback report, I am trying to pull the feedback-related data using feedback date parameters but the issue is feedback tables don't have a Start date and End date so the parameter condition we have written is shown below
AND (
(
:P_Submit_Date_From IS NULL
AND :P_Submit_Date_To IS NULL
AND Trunc(Feedback_req.creation_date) BETWEEN :P_Interview_Date_From
AND :P_Interview_Date_To
)
OR (
:P_Interview_Date_From IS NULL
AND :P_Interview_Date_To IS NULL
AND Trunc(Feedback_req.COMPLETION_DATE) BETWEEN :P_Submit_Date_From
AND :P_Submit_Date_To
)
OR
(
Trunc(feedback_req.creation_date) BETWEEN :P_Interview_Date_From
AND :P_Interview_Date_To
OR
Trunc(Feedback\_req.COMPLETION\_DATE) BETWEEN :P\_Submit\_Date\_From
AND :P\_Submit\_Date\_To
)
)
using this parameter, the report fetches completed feedback data and created feedback data in a single report. However, we are facing a performance-related issue in the report.
Can someone help me to rewrite this condition to resolve the performance issue? please let me know if anyone has worked on similar requirements, your help would be appreciated.
Attached a whole query with this post.
New Feeback report in PROD Logic 23062023.sql