[wp-trac] Re: [WordPress Trac] #7457: Sticky Posts

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 4 05:25:25 GMT 2008


#7457: Sticky Posts
----------------------------------+-----------------------------------------
 Reporter:  ryan                  |        Owner:  anonymous
     Type:  defect                |       Status:  new      
 Priority:  normal                |    Milestone:  2.7      
Component:  General               |      Version:           
 Severity:  normal                |   Resolution:           
 Keywords:  sticky posts blessed  |  
----------------------------------+-----------------------------------------
Comment (by DD32):

 > Ordering by menu_order DESC, post_date DESC results in filesort.

 Probably because ordering by post_date will result in a filesort
 regardless?

 {{{
 EXPLAIN SELECT * FROM `wp_posts` ORDER BY menu_order DESC , post_date DESC

 id      select_type     table   type    possible_keys   key     key_len
 ref     rows    Extra
 1       SIMPLE  wp_posts        ALL     NULL    NULL    NULL    NULL
 196     Using filesort
 }}}

 {{{
 EXPLAIN SELECT * FROM `wp_posts` ORDER BY post_date DESC

 id      select_type     table   type    possible_keys   key     key_len
 ref     rows    Extra
 1       SIMPLE  wp_posts        ALL     NULL    NULL    NULL    NULL
 196     Using filesort
 }}}

 I cant find any form of index which helps the 2nd query let alone the
 first, I might be barking up the wrong tree though.

 > I'm leaning toward feature. I like seeing them in their original place
 in the timeline. If this is deemed a feature, it is an advantage over the
 menu_order method.
 I guess that can be seen as a feature, It depends on what users of the
 functionality are using it for, They may only want the sticky to be shown
 as a sticky, Others would be using it to pin a post in place, yet still
 want it to show in the natural order of posts.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7457#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list