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

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 15 01:04:37 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 rawalex):

 Replying to [comment:31 ryan]:
 > Replying to [comment:29 rawalex]:

 > 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.

 Because of the overhead of calc_found_rows, wouldn't it just be better to
 make the first query full without limits and count it, and control the
 number of items displayed elsewhere?  Right now you are doing two full
 queries, which would be more intensive, no?

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


More information about the wp-trac mailing list