Slow core query
-
hi guys, lately ive been getting slow search results and ive installed a plugin called query monitor and whatever search i make im getting this result
SELECT DISTINCT SQL_CALC_FOUND_ROWS wpw1_posts.* FROM wpw1_posts LEFT JOIN wpw1_term_relationships ON (wpw1_posts.ID = wpw1_term_relationships.object_id) LEFT JOIN wpw1_term_relationships AS tt1 ON (wpw1_posts.ID = tt1.object_id) INNER JOIN wpw1_postmeta ON ( wpw1_posts.ID = wpw1_postmeta.post_id ) LEFT JOIN wpw1_options ON wpw1_options.option_name LIKE CONCAT('_ait_directory2_elements_opts_page_', wpw1_posts.ID) WHERE 1=1 AND ( wpw1_term_relationships.term_taxonomy_id IN (6) AND tt1.term_taxonomy_id IN (6) ) AND (((((FIND_IN_SET(wpw1_posts.ID, (SELECT DISTINCT group_concat(post_id) as ids FROM wpw1_postmeta AS postmeta WHERE postmeta.meta_value LIKE '%ελασ%' AND postmeta.meta_key IN ('subtitle', 'features_search_string')))) OR (wpw1_posts.post_title LIKE '%ελασ%') OR (wpw1_posts.post_content LIKE '%ελασ%'))) OR ((option_value LIKE '%ελασ%')) )) AND ( wpw1_postmeta.meta_key = '_ait-item_item-featured' ) AND wpw1_posts.post_type = 'ait-item' AND (wpw1_posts.post_status = 'publish' OR wpw1_posts.post_status = 'private') GROUP BY wpw1_posts.ID ORDER BY CAST(wpw1_postmeta.meta_value AS CHAR) DESC, wpw1_posts.post_date DESC LIMIT 0, 10
and the caller is
WP_Query->get_posts() wp-includes/class-wp-query.php:2846 WP_Query->query() wp-includes/class-wp-query.php:3238 WP->query_posts() wp-includes/class-wp.php:617 WP->main() wp-includes/class-wp.php:735 wp() wp-includes/functions.php:955 Main Query
These are the lines for the callers in the order it shows them
$this->posts = $wpdb->get_results( $this->request );
return $this->get_posts();
$wp_the_query->query($this->query_vars);
$this->query_posts();
$wp->main( $query_vars );
This comes from a specific search but i always get the same results and it always takes 6.5 to 7 seconds to execute.
Could you tell by this if the problem is from a plugin?
Truth is i deactivated the plugins and it worked for one search i did after deactivating them but then it came back without reactivating them.The plugins im using are these.
AIT Elements Toolkit (theme specific),
AIT Languages (theme specific),
AIT SysInfo (theme specific),
AIT Updater (theme specific),
AIT WordPress 4.2+ Compatibility Fix (theme specific),
Contact Form 7,
Dave’s WordPress Live Search,
Everypay WooCommerce Addon,
Google Analytics Dashboard for WP,
Widget Context,
WooCommerce,
WooCommerce Checkout Field Editor,
WooCommerce Helper,
WP Fastest Cache,
YITH WooCommerce Name Your Price,
Yoast SEO.Any help will be much appreciated. Thank you in advance.
- The topic ‘Slow core query’ is closed to new replies.