wordpress-develop/src/wp-includes/rest-api/endpoints
Jonny Harris 4baf0a1eda Comments: Improve WP_Comment_Query count query performance by setting 'order by' to 'none'.
In cases where `WP_Comment_Query` or `get_comments` is employed with the 'count' parameter set to true, specify 'order by' as 'none'. Since these queries serve solely to determine the count of comments matching specific query parameters, the 'order by' clause becomes redundant and places unnecessary strain on the database server, resulting in slower query execution. Given that count queries are executed on every admin request to retrieve comment counts, this change enhances the performance of the wp-admin interface.

Props guss77, davidbaumwald, SergeyBiryukov, westonruter, peterwilsoncc, foliovision, hareesh-pillai, spacedmonkey.
Fixes #58368

git-svn-id: https://develop.svn.wordpress.org/trunk@56747 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 17:11:21 +00:00
..
class-wp-rest-application-passwords-controller.php Application Passwords: Allow a Super Admin to set an application password on a site they're not a member of. 2022-08-11 18:22:59 +00:00
class-wp-rest-attachments-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-autosaves-controller.php Revisions: slash meta values for autosave (preview) revisions. 2023-09-29 15:05:40 +00:00
class-wp-rest-block-directory-controller.php REST API: Avoid unnecessarily preparing item links. 2022-07-22 13:58:46 +00:00
class-wp-rest-block-pattern-categories-controller.php REST API: Cache schema in block pattern and menu item endpoints. 2023-06-28 15:51:23 +00:00
class-wp-rest-block-patterns-controller.php REST API: Cache schema in block pattern and menu item endpoints. 2023-06-28 15:51:23 +00:00
class-wp-rest-block-renderer-controller.php Docs: Document the globals used in some REST API methods. 2021-06-30 12:33:43 +00:00
class-wp-rest-block-types-controller.php REST API: Improve the block type schema for the name field 2023-09-25 10:00:33 +00:00
class-wp-rest-blocks-controller.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
class-wp-rest-comments-controller.php Comments: Improve WP_Comment_Query count query performance by setting 'order by' to 'none'. 2023-09-29 17:11:21 +00:00
class-wp-rest-controller.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
class-wp-rest-edit-site-export-controller.php Theme: Use a better method to determine the theme name during export 2022-05-17 12:08:15 +00:00
class-wp-rest-global-styles-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-global-styles-revisions-controller.php Docs: Fix indentation issue in WP_REST_Global_Styles_Revisions_Controller class. 2023-07-19 22:51:14 +00:00
class-wp-rest-menu-items-controller.php REST API: Correct the docblocks for various permission related methods. 2023-08-18 17:44:29 +00:00
class-wp-rest-menu-locations-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-menus-controller.php REST API: Correct the docblocks for various permission related methods. 2023-08-18 17:44:29 +00:00
class-wp-rest-navigation-fallback-controller.php Docs: Various docblocks corrections. 2023-07-18 07:35:16 +00:00
class-wp-rest-pattern-directory-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-plugins-controller.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
class-wp-rest-post-statuses-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-post-types-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-posts-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-revisions-controller.php Revisions: framework for storing post meta revisions. 2023-09-26 15:30:34 +00:00
class-wp-rest-search-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-settings-controller.php Coding Standards: Remove superfluous blank lines at the end of various functions. 2023-09-08 10:01:14 +00:00
class-wp-rest-sidebars-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-site-health-controller.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
class-wp-rest-taxonomies-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-templates-controller.php Editor: Fix a PHP notice appearing when adding a new template part. 2023-07-17 14:20:42 +00:00
class-wp-rest-terms-controller.php REST API: Correct the docblocks for various permission related methods. 2023-08-18 17:44:29 +00:00
class-wp-rest-themes-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-url-details-controller.php General: Replace all esc_url_raw() calls in core with sanitize_url(). 2022-06-01 18:12:25 +00:00
class-wp-rest-users-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-widget-types-controller.php Coding Standards: Restore more descriptive variable names in a few class methods. 2023-09-14 12:44:23 +00:00
class-wp-rest-widgets-controller.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00