[wp-trac] [WordPress Trac] #12891: Advanced multi-taxonomy WP_Query()s
WordPress Trac
wp-trac at lists.automattic.com
Tue Nov 16 19:48:01 UTC 2010
#12891: Advanced multi-taxonomy WP_Query()s
----------------------------+-----------------------------------------------
Reporter: markjaquith | Owner: markjaquith
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 3.1
Component: Query | Version: 3.0.1
Severity: normal | Keywords: ongoing-project
----------------------------+-----------------------------------------------
Comment(by scribu):
A simple {{{foo=bar}}} query executes in 0.10 seconds with 22.000 posts,
matching 113 of them:
{{{
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND
wp_posts.ID IN (
SELECT object_id
FROM wp_term_relationships
INNER JOIN wp_term_taxonomy USING
(term_taxonomy_id)
WHERE taxonomy IN ('foo')
AND term_id IN (31)
) AND wp_posts.post_type = 'post' AND
(wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future' OR
wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR
wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT
0, 100
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12891#comment:109>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list