Go to file
Boone Gorges 1708a580fd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29940 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:20:04 +00:00
src Overhaul SQL generating logic in WP_Meta_Query to avoid unnecessary table joins. 2014-10-17 20:20:04 +00:00
tests Overhaul SQL generating logic in WP_Meta_Query to avoid unnecessary table joins. 2014-10-17 20:20:04 +00:00
tools/i18n
.editorconfig .jshintrc is a json file and .editorconfig should treat it like a json file 2014-10-08 19:26:50 +00:00
.gitignore
.jshintrc
.travis.yml PHP 5.6 test failures shouldn't be allowed. 2014-10-06 20:00:54 +00:00
Gruntfile.js Twenty Fifteen: JSHint fixes. 2014-10-14 19:47:11 +00:00
package.json
phpunit.xml.dist Only reset taxonomies and post types between tests when running core tests. 2014-10-10 20:25:39 +00:00
wp-cli.yml
wp-config-sample.php Remove 'WordPress Language' reference from wp-config-sample.php. 2014-09-09 01:22:05 +00:00
wp-tests-config-sample.php