Title: Slow Query in WordPress
Last modified: March 30, 2023

---

# Slow Query in WordPress

 *  Resolved [kevink231](https://wordpress.org/support/users/kevink231/)
 * (@kevink231)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/slow-query-in-wordpress/)
 * I have a WordPress site with a large user db more than 1 million users.
 * I am seeing a slow query in the logs and it looks like this:
 * SELECT wp_users.ID
   FROM wp_users INNER JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.
   user_id )WHERE 1=1 AND (( wp_usermeta.meta_key = ‘wp_user_level’ AND wp_usermeta.
   meta_value != ‘0’ ))ORDER BY display_name ASCLIMIT 0, 50;
 * I want to find what is triggering it and stop it from executing this query. (
   Listing admins and authors is not something I’m intending on using.
 * I have already tried the below with no luck:
 * add_action(‘init’, function () {
   foreach ([‘page’, ‘post’, ‘wh_jobs’, ‘wh_edu’,‘
   wh_glossary’] as $type) {remove_post_type_support($type, ‘author’);}});
 * I suspect that this is likely triggered by someone browsing posts or writing 
   something in wp-admin

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [3 years, 2 months ago](https://wordpress.org/support/topic/slow-query-in-wordpress/#post-16611567)
 * As much as I’d like to, I can’t help fix issues on your site that QM tells you
   about. It would be a full time job for me.
 * You might want to post on the main support forum or do some searching for the
   problem, you’re not the first person to experience this with a large user table.
 * Best of luck.

Viewing 1 replies (of 1 total)

The topic ‘Slow Query in WordPress’ is closed to new replies.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/slow-query-in-wordpress/#post-16611567)
 * Status: resolved