Slow loading backend, big query request
-
Hi,
I’ve noticed that the Read More & Accordion (expand-maker) plugin is triggering a very heavy SQL query in my WordPress admin panel. This happens every time I load the backend, and it’s slowing down my site significantly.Details from Query Monitor
- The query selects from
wp_usermeta
and fetches metadata for over 72,000 user IDs: sqlKopieraRedigeraSELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (2922,2712,3162,1486,2458,3871,...)
- It originates from:
ReadMoreData::getCurrentUserRole()
(inReadMoreData.php:1335
)ReadMoreInit->expnAdminMenu()
(inReadMoreInit.php:146
)update_meta_cache()
in WordPress core
Why Is This Happening?
It looks like the function
getCurrentUserRole()
is fetching all user roles instead of just the current logged-in user. Since this query runs every time the admin panel loads, it significantly slows down the backend. - The query selects from
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.