Migrating Several Million Post forum to bbPress
I’m in the process of migrating an archaic and otherwise obsolete custom-built forum written in ASP to bbPress. The forum has been around for about 20 years and it was essentially a vBulletin clone. It has roughly 10 million posts and growing.
I’d exported CSVs of tables from the existing forum. We imported the users into the database and then associated them with the relevant posts. In the database now, wp_postmeta is 2.5 GB and wp_posts is 4.4 GB. Suffice to say everything is slower now, but the forum is 1200bps dialup modem slow.
I installed Query-Monitor to try and figure it out and this query is taking 53 seconds:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
INNER JOIN wp_postmeta
ON ( wp_posts.ID = wp_postmeta.post_id )
AND wp_posts.post_parent = 36005
AND ( wp_postmeta.meta_key = ‘_bbp_last_active_time’ )
AND wp_posts.post_type = ‘topic’
AND ((wp_posts.post_status = ‘publish’
OR wp_posts.post_status = ‘pending’
OR wp_posts.post_status = ‘closed’
OR wp_posts.post_status = ‘hidden’)
OR (wp_posts.post_status = ‘private’))
GROUP BY wp_posts.ID
ORDER BY wp_postmeta.meta_value DESC
LIMIT 0, 15
I spent time checking out this ticket https://bbpress.trac.wordpress.org/ticket/1925 but wasn’t really left with an idea of what I should be doing to fix this. Not really sure where I should start in thinking about how to get this down to normal speed. I have this running on pretty stacked machine and DB instances on Google Cloud, but I’m open to any input around what the specs of the boxes need to be to handle this.
Also, we’re also migrating our e-commerce site to WooCommerce from Shopify, so speed is definitely a huge issue and I don’t want to have the whole site be slow just because of the forum.
Thanks for any help!
- You must be logged in to reply to this topic.