Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] [Perf optimization] Speed up queued_jobs query (#5945)
Optimizes the query to use just 10% of the resources compared to before by : - Adding a max time range to limit results to just the relevant window - Move the time range filter to the earlier query. Not sure why it makes such a big difference, but it does. Maybe due to the lack of FINAL there? Adding in FINAL tanks the performance Perf change: - Memory used: 9.7 GB -> 0.8 GB - Elapsed time: 3.5 s -> 0.4s - Rows read: 12 million -> 8 million
- Loading branch information