Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: optimise SQL query in observeRetrievalResultCodes (#316)
Rework `observeRetrievalResultCodes` to execute a single SQL query to update all daily codes in one go. Before this change, we would run ~1k individual queries, consume a lot of CPU and trigger CPU throttling alert. As part of this change, I am also adding a console log to tell us how many rows - tuples (day, code) - we are updating in each loop iteration. Signed-off-by: Miroslav Bajtoš <[email protected]>
- Loading branch information