Cleaning up the database
I need a little help with my database. It's been growing and growing and growing, and I can't seem to stop that.I'm the only user on this system, my uploads are not in the database but on disk, and the policy is that stuff older than 170 days is removed.
Yet the database is 173GB at this moment. That can't be right, can it? Even if it's been online since 2019.
Where do I start? Is there an SQL statement that can show me ow many messages there are that should have been dropped long ago? Is there other stuff to look at that can be removed?
I'm about to migrate this installation to another machine, but I can't claim 180GB for just Hubzilla's database. I'd want to migrate my own posts and uploads, and the reactions to them. I don't know who to tell how much space those reactions have eaten up, but I can't imagine it would be more than 10 or 20 GB.
If anybody can tell me what I should look for, and what stuff I could/should remove and what to leave alone, I'd be very grateful 🙏
It's MariaDB. Version 10.3, it's a pretty old installation, and that's one of the reasons why I want to migrate it to another machine.
OPTIMIZE TABLE dreport, session, term, iconfig, xconfig, item;ran today and disk size reduced from 17GB to 12GB