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

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 27 21:38:39 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 mrmist):

 Replying to [comment:21 Denis-de-Bernardy]:
 > Err.. silly pasting. This even:
 >
 > {{{
 > SELECT COUNT($distinct $wpdb->posts.ID) FROM $wpdb->posts $join WHERE
 1=1 $where $groupby
 > }}}

 posts.ID is an autoinc, so it's always unique.  $distinct is superfluous.

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


More information about the wp-trac mailing list