Home Forums WoodMart support forum Slow queries in New Products section

Slow queries in New Products section

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #695416

    jegan.jeyaraman
    Participant

    Hi, we’ve installed the Query Monitor – The developer tools panel for WordPress plugin to check for slow queries. It appears that the query related to the “New Products” section on the homepage is taking a long time to execute.

    Here’s the query we found:

    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
    FROM wp_posts
    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_posts.ID NOT IN (31466)
    AND ( wp_posts.ID NOT IN (
    SELECT object_id
    FROM wp_term_relationships
    WHERE term_taxonomy_id IN (7) ) )
    AND ( ( ( wp_postmeta.meta_key = '_woodmart_new_label'
    AND wp_postmeta.meta_value IN ('on') )
    OR ( wp_postmeta.meta_key = '_woodmart_new_label_date'
    AND CAST(wp_postmeta.meta_value AS DATE) > '2025-11-11' ) )
    AND ( mt1.meta_key = '_stock_status'
    AND mt1.meta_value NOT IN ('outofstock') ) )
    AND wp_posts.post_type = 'product'
    AND ((wp_posts.post_status = 'publish'))
    GROUP BY wp_posts.ID
    ORDER BY RAND()
    LIMIT 0, 10;
    

    Could you please check this and suggest any optimization or caching method for improving the performance of this section?

    Attachments:
    You must be logged in to view attached files.
    #695448

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?

    Thank you in advance

    #695463

    jegan.jeyaraman
    Participant

    Hi Thanks you!

    Just updated

    #695482

    Artem Temos
    Keymaster

    Please disable all plugins that are not related to our theme temporarily and send us your FTP access so we can check what is wrong.

    #695490

    jegan.jeyaraman
    Participant

    Hi

    Yes, all plugins are already disabled.
    Checking with the manager to provide FTP access and will update you soon.

    #695497

    jegan.jeyaraman
    Participant

    Hi

    I have shared staging SFTP access details

Viewing 6 posts - 1 through 6 (of 6 total)