[wp-trac] [WordPress Trac] #14222: Improve dashboard recent comments widget performance by not fetching spam comments

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 26 21:09:18 UTC 2012


#14222: Improve dashboard recent comments widget performance by not fetching spam
comments
--------------------------------------+------------------
 Reporter:  Viper007Bond              |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  3.4
Component:  Performance               |     Version:  3.0
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch commit already  |
--------------------------------------+------------------

Comment (by nacin):

 Current query:
 {{{
 explain extended SELECT * FROM blank_comments c LEFT JOIN blank_posts p ON
 c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY
 c.comment_date_gmt DESC LIMIT 0, 50;
 +----+-------------+-------+--------+-----------------+------------------+---------+-----------------------------+------+-----------+-------------+
 | id | select_type | table | type   | possible_keys   | key              |
 key_len | ref                         | rows | filtered  | Extra       |
 +----+-------------+-------+--------+-----------------+------------------+---------+-----------------------------+------+-----------+-------------+
 |  1 | SIMPLE      | c     | index  | comment_post_ID | comment_date_gmt |
 8       | NULL                        |   50 | 184620.00 |             |
 |  1 | SIMPLE      | p     | eq_ref | PRIMARY         | PRIMARY          |
 8       | wordpress.c.comment_post_ID |    1 |    100.00 | Using where |
 +----+-------------+-------+--------+-----------------+------------------+---------+-----------------------------+------+-----------+-------------+
 }}}

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


More information about the wp-trac mailing list