Alert Composer: overdue learning filter on learnerLearningRecords fetches every record
We have two custom alerts on the learnerLearningRecords resource. Both use the same date field and the same function. The only difference in the date
row is the operator.
Alert 1, learning not yet due:
${assignmentDueDate} >= ${AlertFilterUtils.addDays(AlertFilterUtils.getCurrentDate(), + 0)}
Fetches 4 records. Runs in under a minute.
Alert 2, learning overdue:
TRUNC(${assignmentDueDate}) < ${AlertFilterUtils.addDays(AlertFilterUtils.getCurrentDate(), + 0)}
Fetches 235,511 records to qualify 7. Runs for 76 to 82 minutes.
TRUNC(sysdate) on the right gives the same result, and rebuilding the
alert from scratch made no difference.
So the filter is applied in the query for >= but after the fetch for <.
Our production system has about 170,000 learners, so the overdue alert