Home / Forums / WoodMart support forum / Slow queries in New Products section
Home › Forums › WoodMart support forum › Slow queries in New Products section
Slow queries in New Products section
- This topic has 10 replies, 2 voices, and was last updated 3 weeks, 3 days ago by
Artem Temos.
-
AuthorPosts
-
November 11, 2025 at 3:33 pm #695416
jegan.jeyaramanParticipantHi, 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.November 11, 2025 at 5:19 pm #695448
Artem TemosKeymasterHello,
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
November 11, 2025 at 5:52 pm #695463
jegan.jeyaramanParticipantHi Thanks you!
Just updated
November 11, 2025 at 6:40 pm #695482
Artem TemosKeymasterPlease disable all plugins that are not related to our theme temporarily and send us your FTP access so we can check what is wrong.
November 11, 2025 at 6:56 pm #695490
jegan.jeyaramanParticipantHi
Yes, all plugins are already disabled.
Checking with the manager to provide FTP access and will update you soon.November 11, 2025 at 7:30 pm #695497
jegan.jeyaramanParticipantHi
I have shared staging SFTP access details
November 12, 2025 at 10:26 am #695577
Artem TemosKeymasterAs we can see, the plugins are still active. Please disable them all temporarily so we can investigate the issue.
Kind Regards
November 12, 2025 at 10:35 am #695582
jegan.jeyaramanParticipantHi
Oh! Now all are deactivated except Elementor, Query Monitor, Woocommerce .
could you check now?
November 12, 2025 at 1:22 pm #695626
Artem TemosKeymasterWe’ve analyzed the query and found no performance issues. It appears to be a general database performance problem. We were able to reproduce the same slow query issue using the default WooCoommerce element, which has a query with two meta fields (similar to the one you see with WoodMart). Here are the screenshots.
https://monosnap.ai/file/X0TevtDgxbA4doOldTpERFbcSUiJKa
https://monosnap.ai/file/HdRTNAmOHmMLSALZHgQp9L4a0TyJFzNovember 12, 2025 at 1:47 pm #695632
jegan.jeyaramanParticipantThanks for the update !
I could not see anything in second screenshot. https://monosnap.ai/file/HdRTNAmOHmMLSALZHgQp9L4a0TyJFz
could you clarify ?
November 12, 2025 at 3:31 pm #695659
Artem TemosKeymasterThese screenshots demonstrate that we tested the core WooCommerce element, as shown in the first screenshot: https://monosnap.ai/file/HdRTNAmOHmMLSALZHgQp9L4a0TyJFz. The second screenshot illustrates that the element used also causes slow queries, as shown in the second screenshot: https://monosnap.ai/file/X0TevtDgxbA4doOldTpERFbcSUiJKa.
Both WooCommerce core and our theme’s queries have two meta queries that are handled more slowly by your database. This is not a problem with the queries themselves. Instead, it may be due to the need for database optimizations, such as indexes or proper configuration. You should consult with your hosting provider for assistance in addressing this issue.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register