We have started using Jobrunr 5.13 in our application for simple background job processing. We are using Postgres 12 for persistence. However we have noticed that below query is having high latency of ~8 minutes and choking up the DB.
select * from jobrunr_jobs_stats ORDER BY total ASC LIMIT $1 OFFSET $2
The output of select * from jobrunr_jobs_stats; is:
<?xml version="1.0" encoding="UTF-8"?> <dataset> <SELECT_FROM_JOBRUNR_JOBS_STATS_JJS_ TOTAL="1411870" SCHEDULED="0" ENQUEUED="3343" PROCESSING="0" FAILED="19" SUCCEEDED="57528" ALLTIMESUCCEEDED="2521443.0" DELETED="1350980" NBROFBACKGROUNDJOBSERVERS="1" NBROFRECURRINGJOBS="0"/> </dataset>
We started facing this issue when we had a burst of background jobs to be processed. Though all the jobs were processed, it created a lot of entries in jobrunr_jobs table.
Well, there is a big popup since June last year on your dashboard asking you to upgrade to the latest version of JobRunr. The popup mentions that new a version comes with bugfixes, performance improvements and new features.
As the developer of JobRunr, I don't know what more I can do to incentive users to upgrade...