[wp-trac] [WordPress Trac] #37038: WP_Tax_Query needs caching

WordPress Trac noreply at wordpress.org
Wed Jun 21 03:41:28 UTC 2017


#37038: WP_Tax_Query needs caching
--------------------------+--------------------------
 Reporter:  spacedmonkey  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  4.9
Component:  Query         |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  performance
--------------------------+--------------------------

Comment (by boonebgorges):

 @spacedmonkey Thanks for the review.

 > On line 579 (in class-wp-tax-query.php) hierarchical taxonomies query by
 term_id. Correct me if I am but if term splitting is complete, then tt_id
 and term_id should be the same.

 No: term_id and tt_id are only guaranteed to be correct if there were
 *never* any shared terms. If terms were previously shared and were then
 split, they won't match. (wp_terms and wp_term_taxonomy will have the same
 number of rows in these cases, but the items will be in a different
 order.)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37038#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list