XF 2.2 Reducing the number of records in XF_post

PatMa

Member
...without losing history

My hosting provider has a 1,000,000 record soft limit on tables - and we've managed to pass that mark.
www.mtbnj.com - it took 14 years, we are not that busy!...

I'd hate to lose content - especially some classic rants by members long gone to the ride eternal.

There is some ephemeral type data I could delete (like the trail conditions more than 3 weeks ago.)
but we love to go off-topic, and some of those posts are classic.

I'd guess there are some delete (not visible) and edit history posts in there - but i'd bet there aren't that many.
(and could I just straight up delete them without mucking up everything else up?)

Ideas?
Split the table and have a view which is the union(merge) of two tables?

And if I'm totally in the wrong forum section for this, please move it and tag me.
Cause this is more generic than XF 2.2
 
it is really just the provider plan we are on. $$ does fix it.
Mostly an angel supported site - everyone on the freemium tier.
OK, back to answer your question
post edit history is saved on a seperate table so there is no way to delete some entries from post table without loisng content
splitting post table (like archiving on IPB) is possible .. but you will need to hire a developer and pay him more than what you would pay for a good hosting provider.
 
Its certainty possible to make a custom mod that conditions everything from yesterday to look at post_1 and today on to look at post_2 (or whatever you want to call the tables) but it's a massive addon that will take a while to get working correctly when you can move hosts for similar costs as suggested who doesn't cap limits like table size. such an odd measure to cap anyway.
 
One thing I did was batch delete all old threads in certain forums that had only one post and no replies.

Usually these are useless posts.

Doing this may even be good for SEO
 
Its certainty possible to make a custom mod that conditions everything from yesterday to look at post_1 and today on to look at post_2 (or whatever you want to call the tables)
Having worked on forum software for ~ 20 years by now I consider myself a somewhat experienced developer - I would never ever even consider implementing such sharding for the posts table in PHP.

If sharding is necessary (which usually isn't the case at all anyway) I'd look for solutions on the database layer (eg. partitioning, etc.).
 
Last edited:
Top Bottom