[wp-trac] [WordPress Trac] #24093: WP_Meta_Query is inefficient when referencing the same keys in "OR" query

WordPress Trac noreply at wordpress.org
Fri Oct 17 19:02:26 UTC 2014


#24093: WP_Meta_Query is inefficient when referencing the same keys in "OR" query
----------------------------------+---------------------------
 Reporter:  sc0ttkclark           |       Owner:  boonebgorges
     Type:  defect (bug)          |      Status:  accepted
 Priority:  normal                |   Milestone:  4.1
Component:  Query                 |     Version:  3.5.1
 Severity:  normal                |  Resolution:
 Keywords:  meta-query has-patch  |     Focuses:  performance
----------------------------------+---------------------------

Comment (by sc0ttkclark):

 This looks awesome @boonebgorges -- and brings up another idea that could
 be useful to plugins, adding a filter to the return of
 find_compatible_table_alias would be grand. This could allow a plugin,
 such as Pods, to pick up a meta fields that it covers and stores in a
 separate table and return a custom alias, then hook in later in the joins
 clauses to add it's join there. Other than that, this is the bees knees
 and probably wings too.

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


More information about the wp-trac mailing list