[wp-trac] Re: [WordPress Trac] #7415: "using filesort" in default install

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 27 21:54:29 GMT 2009


#7415: "using filesort" in default install
------------------------------------------------------------+---------------
 Reporter:  dbuser123                                       |        Owner:  anonymous
     Type:  defect (bug)                                    |       Status:  new      
 Priority:  high                                            |    Milestone:  2.8      
Component:  Optimization                                    |      Version:  2.7      
 Severity:  major                                           |   Resolution:           
 Keywords:  database, optimization, slow queries, filesort  |  
------------------------------------------------------------+---------------
Comment (by ryan):

 {{{
 SELECT * FROM wp_comments WHERE comment_post_ID = 1643 AND
 comment_approved = '1' ORDER BY comment_date
 }}}

 That's the comment query that single post pages use when there is not a
 logged in user.  It uses filesort.  Ordering by comment_date_gmt and
 adding a comment_post_ID,comment_approved,comment_date_gmt key gets rid of
 filesort.

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


More information about the wp-trac mailing list