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

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 27 18:56:07 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 Denis-de-Bernardy):

 the count query you just posted is erroneous. it should be:

 {{{
 SELECT $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby
 }}}

 Adding to this, a $having clause would be a bonus. ;-)

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


More information about the wp-trac mailing list