• SELECT SQL_CALC_FOUND_ROWS wp_users.*
    FROM wp_users
    INNER JOIN wp_usermeta
    ON ( wp_users.ID = wp_usermeta.user_id )
    WHERE 1=1
    AND ( ( ( wp_usermeta.meta_key = 'wp_capabilities'
    AND wp_usermeta.meta_value LIKE '%\"Administrator\"%' ) ) )
    ORDER BY user_login ASC

    This is in wp_user_query
    My current site have around 100k+ Orders. It isnt that slow, but I notice wordpres keep calling this SQL Query again and again. Is there any possibility I can put this in transient cache? To speed up the wp-admin? Thank you

    • This topic was modified 4 years, 4 months ago by bcworkz. Reason: code fixed

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter herng77

    (@herng77)

    Anybody would want to help in this? Any help will be greatly appreciated!

    Moderator bcworkz

    (@bcworkz)

    You shouldn’t attempt to bump your topic in these forums, it doesn’t have the effect it does in most forums, it actually works against you, as your topic falls off the “No Replies” list that regular members here use to find those still needing help. Oh, it’s also against our guidelines ??

    You should probably ask in the dedicated support forum for whatever plugin keeps making that query. By the time core code is invoked, there is no help for it. Getting cached results has to happen in the plugin before trying to invoke core code.

    Thread Starter herng77

    (@herng77)

    This is the caller that caused this, isn’t this from WordPress? Or is it from the other plugin? Are there any way I can track? Thanks..

    Moderator bcworkz

    (@bcworkz)

    Well, the direct caller is a WP core class, but I’m pretty sure it’s not WP core repeatedly using the class like that, the root source is likely your theme or a plugin. Try deactivating all plugins and switching to twentytwenty theme. Repeated queries ought to go away. Restore your normal configuration one module at a time until the queries return. You’ve then narrowed down the root source of the queries.

    Thread Starter herng77

    (@herng77)

    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP_User_Query Transient Cache’ is closed to new replies.