[wp-trac] [WordPress Trac] #34982: New algorithm for displaying a hierarchical list of post objects in the WP_Posts_List_Table is incomplete

WordPress Trac noreply at wordpress.org
Wed Jun 15 15:20:23 UTC 2016


#34982: New algorithm for displaying a hierarchical list of post objects in the
WP_Posts_List_Table is incomplete
-------------------------------------+-----------------------------
 Reporter:  rodrigosprimo            |       Owner:  johnbillion
     Type:  enhancement              |      Status:  reviewing
 Priority:  normal                   |   Milestone:  Future Release
Component:  Posts, Post Types        |     Version:  4.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance
-------------------------------------+-----------------------------

Comment (by rodrigosprimo):

 I spoke with @johnbillion and he asked me to post here the MySQL query to
 get hierarchical post objects with and without the patch.

 Without the patch:

 {{{#!sql
 SELECT wp_posts.*
 FROM wp_posts
 WHERE 1=1
 AND wp_posts.post_type = 'page'
 AND (wp_posts.post_status = 'publish'
 OR wp_posts.post_status = 'future'
 OR wp_posts.post_status = 'draft'
 OR wp_posts.post_status = 'pending'
 OR wp_posts.post_status = 'private')
 ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
 }}}

 With the patch:

 {{{#!sql
 SELECT wp_posts.ID, wp_posts.post_parent
 FROM wp_posts
 WHERE 1=1
 AND wp_posts.post_type = 'page'
 AND (wp_posts.post_status = 'publish'
 OR wp_posts.post_status = 'future'
 OR wp_posts.post_status = 'draft'
 OR wp_posts.post_status = 'pending'
 OR wp_posts.post_status = 'private')
 ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34982#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list