[wp-trac] [WordPress Trac] #30044: Use subqueries for AND clauses in WP_Meta_Query

WordPress Trac noreply at wordpress.org
Wed Oct 22 00:56:31 UTC 2014


#30044: Use subqueries for AND clauses in WP_Meta_Query
--------------------------+-----------------------------
 Reporter:  boonebgorges  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+-----------------------------
Changes (by boonebgorges):

 * type:  defect (bug) => enhancement


Comment:

 p51labs - Cool, this looks like an interesting start! A couple thoughts -

 * It's pretty hard to use in this format. You think you could generate a
 proper svn or git patch with your newly suggested `get_sql_for_query()`?
 This'd make it a lot easier to test. (Ideally you would also use tabs
 instead of spaces for indentation and adhere to other WP coding standards
 too - again, just to make this easier to read for the purposes of review.)
 * When running the unit test suite with your patch, quite a few syntax
 errors come up. It looks like you're doing something funny when joining
 subclauses with AND.
 * Performance improvements when using AND are very impressive. When using
 OR, it's not as dramatic when compared with current trunk, though there is
 still an improvement. I'm curious to know how performance will look with
 different kinds of data sets: a larger number of posts; a greater variety
 of meta_keys; much smaller amounts of posts/postmeta.

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


More information about the wp-trac mailing list