I'm in a situation with a wordpress site where a table wp_options
keeps increasing in filesystem size really fast even though it only has 10000 records and we have to constantly optimize it to reduce the usage.
It's my understanding that when records are constantly deleted / inserted they are not actually deleted from the ibd file but they're kind of soft-deleted.
Thus the filesystem size on the file actually increases constantly reaching even 500G within 2 days.
In order to fix the issue I need to actually see what is being written / deleted from the table constantly to find possible plugins that might be affecting it.
I can safely assume it's wordpress transients however I can't say with certainty which type of transient is causing this bloat without examining the data.
So in order to find this out I'm looking for ways to read the soft-deleted data from the bloated ibd file.
I've tried a couple of tools like undrop-for-innodb but it's not yielding any results.
Any ideas how I can read the mass of deleted data that's occupying the filesystem space?
Server version: 10.6.15-MariaDB-1:10.6.15+maria~ubu2004 mariadb.org binary distribution
ALTER TABLE wp_options FORCE
to get the size down, should take as much time as writing those existing 10k records. Look atSHOW ENGINE INNODB STATUS
at the and "History list length" information_schema.INNODB_TRX on transactions open on the table. If it continues create a bug report.