• Hello, I spotted the slow query after woocommerce update.
    It worked normally for 3 years without changes and now this.
    Thanks in advance.

    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.ID IN (<<thousand random product ids>>)
    AND wp_posts.post_parent = 0
    AND ( wp_posts.ID NOT IN (
    SELECT object_id
    FROM wp_term_relationships
    WHERE term_taxonomy_id IN (60) ) )
    AND wp_posts.post_type = ‘product’
    AND ((wp_posts.post_status = ‘publish’))
    GROUP BY wp_posts.ID
    ORDER BY RAND()
    LIMIT 0, 10

Viewing 1 replies (of 1 total)
  • Thread Starter inthecarbehind

    (@inthecarbehind)

    So far, I discovered that the query is called whenever you click any category or subcategory. Then the query calles all the products in the shop. The products that show in a category displayed right, but it takes 10sec. BUG REPORT

Viewing 1 replies (of 1 total)

The topic ‘Woocommerce slow query WP_Query->get_posts() after update’ is closed to new replies.