[wp-trac] [WordPress Trac] #14572: post_author_meta_box causes fatal error on site with large userbase.
WordPress Trac
wp-trac at lists.automattic.com
Mon Sep 6 10:02:10 UTC 2010
#14572: post_author_meta_box causes fatal error on site with large userbase.
----------------------------+-----------------------------------------------
Reporter: tomdebruin | Owner: scribu
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 3.1
Component: Administration | Version: 3.0.1
Severity: normal | Keywords: needs-patch gsoc
----------------------------+-----------------------------------------------
Comment(by filosofo):
Replying to [comment:25 mdawaffe]:
> Because the MySQL optimizer is naive in this situation:
http://dev.mysql.com/doc/refman/5.0/en/subquery-restrictions.html
That's grim.
> You can force the inner query to be executed first by doing something
like:
Couldn't you also get around the optimizer's correlated subquery by
joining the results of the subquery instead?
{{{
SELECT DISTINCT(minibb_users.ID) FROM minibb_users
JOIN (
SELECT user_id FROM minibb_usermeta
WHERE CASE meta_key
WHEN 'wporg_5_capabilities' THEN meta_value IS NOT NULL
END
GROUP BY user_id HAVING COUNT(*) = 1
) AS userquery ON minibb_users.ID = userquery.user_id
ORDER BY user_login ASC
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14572#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list