WordPress.org

Ready to get started?Download WordPress

Forums

Top Contributors
Exclusion Scans Through All Member Records in Database (1 post)

  1. Tranny
    Member
    Posted 2 years ago #

    I run a big site with a lot of activity and 150k+ registered members. I use this plugin and recently had to add someone to a list of members excluded from display in top 10.

    Then I noticed that a MySQL query examines 150k+ rows each time it's used, completely massacring the database. I was wondering is developer of this plugin could fix it. It will not have an impact on sites with only a few members, but when you get into 6 digits, that's a significant strain on the processor:

    # Time: 120703  3:20:01
    # User@Host: @@@@@@@[########] @ localhost []
    # Query_time: 0.709128  Lock_time: 0.000086 Rows_sent: 10  Rows_examined: 153969
    use %%%%%%%%%;
    SET timestamp=1341310801;
    SELECT  COUNT(comment_ID) AS <code>comment_count</code>,
                                                    comment_author,
                                                    comment_author_email,
                                                    comment_author_url
                                            FROM wp_comments
                                            WHERE comment_approved = 1
                                            AND comment_type = ''
                                            AND LOWER(comment_author_email) NOT IN('aaaaa@bbbbbb.com')
    
                                            GROUP BY comment_author_email
                                            ORDER BY comment_count DESC
                                            LIMIT 10;

    http://wordpress.org/extend/plugins/top-contributors/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic