A solution I've seen for other places that have a database that grows to fatigue; they split it into multiple databases.
Like, in your case, 4 databases; first for posts 1-99999999, second for posts 100000000-199999999, etc.
Then, you only need to substr() or int() the first digit to determine which database to call.
If it were me, I'd simply copy the existing database (all entries) into all 3 databases, so the transition into updated code doesn't cause any posts to fail to appear. Once the code is changed, then each database can be cleaned of its non-relevant data, and optimized.
All the new databases should run much quicker with a far more managable quantity of data.
Please sign in to leave a comment.