Skip to content

Conversation

@jzbahrai
Copy link
Collaborator

@jzbahrai jzbahrai commented Dec 18, 2025

Summary | Résumé

Change the get notifications for a month to call a new summary table
This is because the summary table only stores data for a month, vs day (which is what ft_notification_status does).
This table is a lot faster to answer the question how many notifications have been send by notify.

DONOT MERGE, will test this after code freeze and then merge

We can assume atleast the data in the table is correct, as if I go and query production, I see

select month, notification_type, sum(notification_count) from monthly_notification_stats_summary where month >='2025-11-01' and month <='2025-11-30' and service_id not in ('30b2fb9c-f8ad-49ad-818a-ed123fc00758', 'd6aa2c68-a2d9-4437-ab19-3ae8eb202553') group by 1, 2 ;
         month          | notification_type |   sum
------------------------+-------------------+---------
 2025-11-01 00:00:00+00 | sms               |  295562
 2025-11-01 00:00:00+00 | email             | 9261689

which is the same as
Screenshot 2025-12-19 at 11 33 18 AM

which currently calling ft_notification_status

(after this PR is merged, we will be using the new table)

@jzbahrai jzbahrai requested a review from jimleroyer as a code owner December 18, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants