Currently the support system has 486k notificationinstances in JIRA's support system. There is no way currently to clean them up easily.
If we can add a 'created' column to the notificationinstance table, then we can periodically remove ones that aren't relevant anymore.
For the old ones, can we have an upgrade task that sets the created date to be either the date of upgrade, or the date of update of the issue?
Please refer to Preparing for JIRA 5.2 for a thorough explanation about how the changes within this improvement request affect JIRA and the way it now handles mail.