mirror of
https://github.com/GSA/notifications-api.git
synced 2026-03-01 22:40:02 -05:00
So since removing the subquery in the previous commit, we now are doing all of the inserts using offsets and limits to group by 10,000 and deleting all records in a single query (which could be up to as many as 10 million rows). We want to avoid doing this, because both of these ways we think are going to result in expensive queries. Therefore we have introduced our own chunking of the notifications by hour periods meaning we do not need to use offset and limits. We estimate that GOV.UK email will at most send 600,000 notifications per hour (175 per second * 60 * 60).