[wp-trac] [WordPress Trac] #9642: Database Schema Optimizations

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 5 16:11:26 UTC 2009


#9642: Database Schema Optimizations
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  Denis-de-Bernardy
     Type:  enhancement        |      Status:  accepted         
 Priority:  normal             |   Milestone:  2.9              
Component:  Optimization       |     Version:  2.8              
 Severity:  normal             |    Keywords:                   
-------------------------------+--------------------------------------------

Comment(by dbuser123):

 Posted before but still not fixed.

 Another slow query (0.30s for a 50 MB comments table) I regularly
 encounter is this one:
 {{{
 SELECT comment_post_ID
 FROM comments
 WHERE LCASE(comment_author_email) = 'user at host.com' AND
 comment_subscribe='Y' AND comment_approved = '1'
 GROUP BY comment_post_ID
 }}}
 It would be better to always store e-mail as lowercase, stop using the
 LCASE function, and add an index on (comment_author_email,
 comment_post_ID).

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


More information about the wp-trac mailing list