We have a client on WP-Engine who runs a large WooCommerce site. It's currently weighing in at 20,000+ product posts and they recently hit some performance issues. They bumped up to WP-Engine Dedicated, but are still seeing painfully slow page loads on the product pages. Surprisingly WP-Engine hasn't been much help and are pointing at WooCommerce. My guess is since e-commerce can't leverage their caching (it needs to be off for all the dynamic stuff going on), they don't have a solution.
I've narrowed it down to a few slow queries below. Some googling hasn't really turned up anything. Wondering if anyone has any insight:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)
INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id)
WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (980) )
AND wp_posts.post_type = 'product'
AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')
AND ( (wp_postmeta.meta_key = '_visibility'
AND CAST(wp_postmeta.meta_value AS CHAR) IN ('visible','catalog'))
AND (mt1.meta_key = '_stock_status'
AND CAST(mt1.meta_value AS CHAR) = 'instock') )
GROUP BY wp_posts.ID
ORDER BY 1
DESC
LIMIT 0, 100
/* From [/index.php:17] */
require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts #154 (20,429.9ms)
SELECT wp_posts.ID FROM wp_posts
INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)
INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id)
WHERE 1=1
AND ( wp_term_relationships.term_taxonomy_id IN (980) )
AND wp_posts.post_type = 'product'
AND (wp_posts.post_status = 'publish')
AND ( (wp_postmeta.meta_key = '_visibility'
AND CAST(wp_postmeta.meta_value AS CHAR) IN ('visible','catalog'))
AND (mt1.meta_key = '_stock_status'
AND CAST(mt1.meta_value AS CHAR) = 'instock') )
GROUP BY wp_posts.ID ORDER BY wp_posts.post_date
DESC
/* From [/wp-content/plugins/woocommerce/classes/class-wc-query.php:337] */
require('wp-blog-header.php'), wp, WP->main, do_action_ref_array, call_user_func_array, WC_Query->get_products_in_view, get_posts, WP_Query->query, WP_Query->get_posts #165 (14,645.5ms)