According to the report made here:
It is possible to receive duplicate notifications.
After debugging and researching this issue is happening because the user_notifications table allows for duplicate entries of each notification type and method per user. Not entirely sure how this happened, but one possible solution going forward is to add a constraint wherein the item_type, user_id, and method columns need to be unique.
The query needed to find the existing duplicate data is as follows:
This returns 184 rows on phpbb.com but will be needed in order to create a migration to correct the data.
While running the above query it was also noted that it is EXTREMELY slow. The notification settings page is also responding very slow as well on load and on saving the form. Upon closer inspection there are no indexes in the user_notifications table. I would recommend adding the following indexes:
This is based on how the data is being retrieved in several portions of the core.