WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
Slow query (2 posts)

  1. Cellard
    Member
    Posted 1 year ago #

    Database query in file "postratings-stats.php" at line 224 is very slow (up to 5 seconds to run), because there are 36k rows in "wp_posts" table in my case. It is naturally following from using LEFT JOIN in query.

    The question is: how to speed it up?

    http://wordpress.org/extend/plugins/wp-postratings/

  2. Cellard
    Member
    Posted 1 year ago #

    My temporary solution is to modify the query, so it isn't use current_time(), but date('Y-m-d 00:00:00') instead. Then the rating and query itself are changed one time per day. Database server caches the query and returns the result immediately.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags