Make WordPress Core

Opened 19 months ago

Last modified 6 months ago

#54378 new enhancement

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

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

Description

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:

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

Change History (5)

#1 @knutsp
19 months ago

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

#2 @sabernhardt
18 months ago

  • Component changed from Administration to Quick/Bulk Edit

#3 @webcommsat
8 months ago

This was reviewed in the weekly focus on component tickets this week. This could be an improvement if there is a contributor(s) who is able to work on this. @activecoder is this something you would like to work on and do you have any examples to help others with understanding the extent of this being an issue? Thank you for raising the question and for your first ticket in Trac.

#4 @webcommsat
8 months ago

This was reviewed in the weekly focus on component tickets this week. This could be an improvement if there is a contributor(s) who is able to work on this. @activecoder is this something you would like to work on and do you have any examples to help others with understanding the extent of this being an issue? Thank you for raising the question and for your first ticket in Trac.

This ticket was mentioned in Slack in #core by abhanonstopnews. View the logs.


6 months ago

Note: See TracTickets for help on using tickets.