[wp-trac] Re: [WordPress Trac] #5137: Taxonomy intersection queries
are inefficient
WordPress Trac
wp-trac at lists.automattic.com
Wed Oct 10 20:17:07 GMT 2007
#5137: Taxonomy intersection queries are inefficient
----------------------------------+-----------------------------------------
Reporter: ryan | Owner: anonymous
Type: defect | Status: reopened
Priority: normal | Milestone: 2.3.1
Component: General | Version: 2.3
Severity: normal | Resolution:
Keywords: taxonomy performance |
----------------------------------+-----------------------------------------
Changes (by Denis-de-Bernardy):
* status: closed => reopened
* resolution: fixed =>
Comment:
because if you've the code in there already... just replace:
{{{
$post_ids = $wpdb->get_col($tsql);
(and the stuff that follows)
}}}
with:
{{{
$where .= " AND $wpdb->posts.ID IN ( $tsql ) ";
}}}
it save a return trip to the sql server and some needless array processing
D.
--
Ticket URL: <http://trac.wordpress.org/ticket/5137#comment:12>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list