• Resolved pduclo

    (@pduclo)


    We have a large store with 1000s of variable products. Each with 100s of variations and many attributes. So our postmeta table is pretty big. But store runs well. We are setting up CR Google Review Feed and I am getting a timeout on this page.
    admin.php?page=cr-reviews-product-feed&tab=reviews

    Looking at the SQL Slow Logs, I see these queries taking 30-40 seconds and examining 9 million rows. I don’t think the results are returning before the nginx page timeout.

    I could increase the page timeout to accommodate but am hoping that these queries can be optimized instead. Thoughts?

    # Time: 2022-11-28T22:12:10.243490Z
    # Query_time: 39.603373 Lock_time: 0.000131 Rows_sent: 1657045 Rows_examined: 9161703
    SET timestamp=1669673530;
    SELECT meta.meta_id, meta.meta_key, meta.meta_value
    FROM wp_postmeta AS meta, wp_posts AS posts
    WHERE meta.post_id = posts.ID AND posts.post_type LIKE ‘%product%’ AND (
    meta.meta_key NOT LIKE ‘\_%’
    OR meta.meta_key LIKE ‘\_woosea%’
    OR meta.meta_key LIKE ‘\_wpm%’ OR meta.meta_key LIKE ‘\_cr_%’ OR meta.meta_key LIKE ‘\_cpf_%’
    OR meta.meta_key LIKE ‘\_yoast%’
    OR meta.meta_key = ‘_product_attributes’
    )
    GROUP BY meta.post_id, meta.meta_key;

    # Time: 2022-11-28T22:12:53.432228Z
    # Query_time: 34.353753 Lock_time: 0.000270 Rows_sent: 1657045 Rows_examined: 9161708
    SET timestamp=1669673573;
    SELECT meta.meta_id, meta.meta_key, meta.meta_value
    FROM wp_postmeta AS meta, wp_posts AS posts
    WHERE meta.post_id = posts.ID AND posts.post_type LIKE ‘%product%’ AND (
    meta.meta_key NOT LIKE ‘\_%’
    OR meta.meta_key LIKE ‘\_woosea%’
    OR meta.meta_key LIKE ‘\_wpm%’ OR meta.meta_key LIKE ‘\_cr_%’ OR meta.meta_key LIKE ‘\_cpf_%’
    OR meta.meta_key LIKE ‘\_yoast%’
    OR meta.meta_key = ‘_product_attributes’
    )
    GROUP BY meta.post_id, meta.meta_key;

    # Time: 2022-11-28T22:13:36.688242Z
    # Query_time: 33.167871 Lock_time: 0.000173 Rows_sent: 1657045 Rows_examined: 9161708
    SET timestamp=1669673616;
    SELECT meta.meta_id, meta.meta_key, meta.meta_value
    FROM wp_postmeta AS meta, wp_posts AS posts
    WHERE meta.post_id = posts.ID AND posts.post_type LIKE ‘%product%’ AND (
    meta.meta_key NOT LIKE ‘\_%’
    OR meta.meta_key LIKE ‘\_woosea%’
    OR meta.meta_key LIKE ‘\_wpm%’ OR meta.meta_key LIKE ‘\_cr_%’ OR meta.meta_key LIKE ‘\_cpf_%’
    OR meta.meta_key LIKE ‘\_yoast%’
    OR meta.meta_key = ‘_product_attributes’
    )
    GROUP BY meta.post_id, meta.meta_key;

    # Time: 2022-11-28T22:14:20.940949Z
    # Query_time: 34.179783 Lock_time: 0.000222 Rows_sent: 1657045 Rows_examined: 9161708
    SET timestamp=1669673660;
    SELECT meta.meta_id, meta.meta_key, meta.meta_value
    FROM wp_postmeta AS meta, wp_posts AS posts
    WHERE meta.post_id = posts.ID AND posts.post_type LIKE ‘%product%’ AND (
    meta.meta_key NOT LIKE ‘\_%’
    OR meta.meta_key LIKE ‘\_woosea%’
    OR meta.meta_key LIKE ‘\_wpm%’ OR meta.meta_key LIKE ‘\_cr_%’ OR meta.meta_key LIKE ‘\_cpf_%’
    OR meta.meta_key LIKE ‘\_yoast%’
    OR meta.meta_key = ‘_product_attributes’
    )
    GROUP BY meta.post_id, meta.meta_key;

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Timeout on Review > Google > Review Tab’ is closed to new replies.