frm
Well-known member
I have the edit history going back to only January 13th on a small board going back to August 2024. But, it takes up 0.3MB of unwarranted space, so I was going to make an admin suggestion to purge posts after X days (comparing the timestamps), but I want to ensure that it's removing the edit history already before doing so. I'm sure this number would only grow as time goes on if the edit history is never purged. Negligible in the scheme of things, but still for optimization purposes, it should be purged after a while (as an option since some admins may want a permanent historical record).
Others to weigh in to see the space used by your
Test on a copy of your live board.
Others to weigh in to see the space used by your
xf_edit_history
table and to also browse it for the oldest edit history date to see if it's already purging after 2 months (as the timestamp algns with 2 months already for me-surely, I've made edits prior to that)? However, another dev board is over 1MB; though, it hasn't been accessed in a while to trigger any cron jobs that might have purged this by now if it is already set for 2 months.Test on a copy of your live board.
SQL:
SELECT TABLE_NAME, table_rows, data_length, index_length,
round(((data_length + index_length) / 1024 / 1024),2) "Size in MB"
FROM information_schema.TABLES WHERE table_schema = "xf_your_database" AND TABLE_NAME = "xf_edit_history";