Query is very slow and resources consuming
-
The following query in file wp-includes/taxonomy.php line 4000 is very slow and resources consuming when there are big amount of users that completing the functional operation in the same time on my site.
Can we do something about it?Find below attached image of query:

$count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status IN ('" . implode( "', '", $post_statuses ) . "') AND post_type IN ('" . implode( "', '", $object_types ) . "') AND term_taxonomy_id = %d", $term ) );Need to optimize this query
-
Hello there,
Could you please share a link to your site? I didn’t notice any sites on WordPress.com under your account. If your site is hosted somewhere else, it could be helpful to ask in the WordPress.org forums instead:
https://wordpress.org/support/forums/Have a nice day!
- The topic ‘Query is very slow and resources consuming’ is closed to new replies.