Hi Neels,
We looked into this a couple years ago, but didn't come up with a good solution context switched to something else.
Just add a few thousand SMS to the DB (DB should 10Mb or more roughly) and start OsmoNITB. You'll notice it's agony immediately.
It's been a while, but IIRC the issue is that the DB didn't have proper indexes for the kinds of queries we're running on it, so it's getting super inefficient.
Regarding removing SMS - it should be fine based on validity time of the SMS and it was completely broken. I had a patch set which fixed validity time handling, but IIRC it wasn't merged. We can probably dug it up, but I don't have much time to rebase / adapt it to the new codebase right now. If there are any volunteers, that would be great.
Please excuse typos. Written with a touchscreen keyboard.--Regards,Alexander ChemerisCTO/Founder Fairwaves, Inc.https://fairwaves.co