Files
wordpress/wp-includes
Boone Gorges 9345e9ffa5 Overhaul SQL generating logic in WP_Meta_Query to avoid unnecessary table joins.
The logic used to generate clause SQL in `WP_Meta_Query` is somewhat arcane,
stemming mostly from an ongoing effort to eliminate costly table joins when
they are not necessary. By systematizing the process of looking for shareable
joins - as was done in `WP_Tax_Query` [29902] - it becomes possible to simplify
the construction of SQL queries in `get_sql_for_clause()`. Moreover, the
simplified logic is actually considerably better at identifying shareable
joins, such that certain uses of `WP_Meta_Query` will see joins reduced by 50%
or more.

Includes integration tests for a representative cross-section of the query
clause combinations that result in shared table aliases.

Props boonebgorges, sc0ttkclark.
See #24093.
Built from https://develop.svn.wordpress.org/trunk@29940


git-svn-id: http://core.svn.wordpress.org/trunk@29691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-17 20:21:18 +00:00
..
2014-09-11 19:07:17 +00:00
2014-10-16 19:02:38 +00:00
2014-08-09 19:30:17 +00:00
2014-08-09 19:30:17 +00:00
2014-10-16 04:45:17 +00:00
2014-09-12 05:51:17 +00:00
2014-10-16 19:02:38 +00:00
2014-09-29 04:07:15 +00:00