wordpress-develop/tests/phpunit/tests/post
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
..
attachments.php Make sure the $parent argument of wp_insert_attachment() still works as expected after [28579]. 2014-09-15 14:23:31 +00:00
filtering.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
formats.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
gallery.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
getPages.php Eliminate use of extract() in wp_dropdown_pages(). 2014-05-15 01:11:21 +00:00
listPages.php Add unit tests for wp_list_pages(). 2014-05-15 01:17:37 +00:00
meta.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
nav-menu.php Change the default orderby value in wp_get_nav_menus() to 'name'. 2014-09-29 15:44:26 +00:00
objects.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
output.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
query.php Overhaul SQL generating logic in WP_Meta_Query to avoid unnecessary table joins. 2014-10-17 20:20:04 +00:00
revisions.php This test in post/revisions.php is too misleading and doesn't work as expected since multiple queries can occur before the one that is intended for testing. 2014-07-02 19:56:50 +00:00
slashes.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
template.php Eliminate use of extract() in wp_dropdown_pages(). 2014-05-15 01:11:21 +00:00
types.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00