[wp-trac] [WordPress Trac] #54378: Admin Pages - The dropdown of 'Main Page (no parent)' on QuickEdit query is slow

WordPress Trac noreply at wordpress.org
Thu Nov 4 22:55:38 UTC 2021


#54378: Admin Pages - The dropdown of 'Main Page (no parent)' on QuickEdit query is
slow
---------------------------------------------+-----------------------------
 Reporter:  activecoder                      |      Owner:  (none)
     Type:  defect (bug)                     |     Status:  new
 Priority:  normal                           |  Milestone:  Awaiting Review
Component:  Administration                   |    Version:  5.8.1
 Severity:  normal                           |   Keywords:
  Focuses:  ui, administration, performance  |
---------------------------------------------+-----------------------------
 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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54378>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list