Make WordPress Core

Opened 3 months ago

Last modified 5 weeks ago

#54378 new enhancement

Admin Pages - The dropdown of 'Main Page (no parent)' on QuickEdit query is slow

Reported by: activecoder Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Quick/Bulk Edit Keywords:
Focuses: administration, performance Cc:


Hi, It seems like the file "wordpress/wp-admin/includes/class-wp-posts-list-table.php", line "wp_dropdown_pages( $dropdown_args );" that used to display the QuickEdit dropdown for 'Main Page (no parent)' is triggering a SQL query on all columns of the wp_posts table for all top level pages. This cause a very slow query if the system has lots of top level pages. Should WP use a more optimize query for this dropdown list that only going to display the Page title?

The query used for the drop down is:

FROM wp_posts
WHERE (post_type = 'page'
AND post_status = 'publish')
ORDER BY menu_order,wp_posts.post_title ASC

Change History (2)

#1 @knutsp
3 months ago

  • Focuses ui removed
  • Type changed from defect (bug) to enhancement
  • Version 5.8.1 deleted

#2 @sabernhardt
5 weeks ago

  • Component changed from Administration to Quick/Bulk Edit
Note: See TracTickets for help on using tickets.