[wp-trac] [WordPress Trac] #18081: Improve performance of taxonomy queries, avoid temporary tables

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 12 10:44:53 UTC 2011


#18081: Improve performance of taxonomy queries, avoid temporary tables
-----------------------------------+-----------------------------
 Reporter:  tott                   |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Taxonomy               |     Version:  3.2
 Severity:  normal                 |  Resolution:
 Keywords:  3.3-early westi-likes  |
-----------------------------------+-----------------------------
Changes (by westi):

 * keywords:   => 3.3-early westi-likes
 * version:   => 3.2
 * milestone:  Awaiting Review => Future Release


Comment:

 This looks like an interesting optimisation.

 Some thoughts:
  * Can you add before and after EXPLAIN outputs for the two queries - I
 like to see these on tickets as it makes it move obvious the reasoning
 behind the change :)
  * I think {{{transform_array_to_sql_condition()}}} might be nicer if it
 also took the field name and therefore returned either {{{fieldname =
 'xxx'}}} or {{{fieldname IN ( 'xxx', 'yyy' )}}} because something like
 {{{WHERE term_taxonomy_id $term_ids_in }}} is hard to read in a query and
 makes you double take.
  * I wonder if {{{transform_array_to_sql_condition()}}} should do any
 escaping on non integer values.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18081#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list