[wp-trac] [WordPress Trac] #11213: Missing keys on user IDs?
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 28 12:54:35 UTC 2010
#11213: Missing keys on user IDs?
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: ryan
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Database | Version: 2.9
Severity: normal | Keywords: has-patch early dev-feedback
-------------------------------+--------------------------------------------
Comment(by Denis-de-Bernardy):
much the same: I'm not entirely sure if deleting a user re-assigns or
unsets that user's ID in comments, but if it does the index helps. it
could be argued that such an index isn't useful, though, since it's a very
infrequent query.
That is *unless* someone decides to build a forum using a custom WP type
("thread") and comments. In this case, fetching a user's participated
threads (or more simply in WP, his participated discussions) makes it
indispensable.
Re the one on the posts table, my original thought had a lot more to do
with the author-related queries.
Note that, in both cases, it may make sense to index (user_id, status) or
even (user_id, status, date) instead.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11213#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list