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

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 14 19:27:32 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         |    Keywords:  database, optimization, slow queries, filesort
--------------------------+-------------------------------------------------

Comment(by ryan):

 Replying to [comment:29 rawalex]:
 > If you need the data and the count, why not just do the query and then a
 mysql_count_rows?  If you are just looking for the count, then severely
 limit the fields you are pulling in (wp_post.* is a bad choice if you
 don't need the data).  Less fields means less data space required.

 We don't need to count the number of rows in the result, we need to count
 the number of rows the query would return if it had no limits. Without
 SQL_CALC_FOUND_ROWS, we have to do a separate COUNT query.

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


More information about the wp-trac mailing list