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

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 14 08:01:31 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):

 One other thing is the use in the archive page queries of year(date)
 month(date) in queries.  It would be much more effecient to create a
 "first date" and "last date" and have the query look for post dates
 between them.  The natural date comparison is much more effecient than
 requiring two date conversions to a year number / month number on each
 item, and would allow the query to use a date index to be somewhat more

 Basically, if a query can't use an index, it normally should be re-written
 to use one.

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

More information about the wp-trac mailing list