• Resolved sweettea2

    (@sweettea2)


    Hello! We have a large eCommerce site that is having trouble with slow mysql queries. I’ve run the Query Monitor plugin and the SELECT SQL_CALC_FOUND_ROWS query seems to be one of the culprits. I’m not familiar with modifying the queries in phpmyadmin, so would appreciate your help with any tips on how to make this faster. We have an excellent hosting provider and they have done various optimization work already.

    I’ve found this article (https://wpartisan.me/tutorials/wordpress-database-queries-speed-sql_calc_found_rows) that mentions how to optimize the SQL_CALC_FOUND_ROWS query. Would something like this help?

    Please see below for one of the queries in question…

    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_posts.ID NOT IN ( SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (?i?) ) AND wp_term_relationships.term_taxonomy_id IN (?ilonglist?) ) AND ((wp_posts.post_type = ?s? AND (wp_posts.post_status = ?s? OR wp_posts.post_status = ?s?))) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Slow Query on Very Large Woocommerce Site’ is closed to new replies.