Support » Plugin: Popularity Posts Widget » Query Running every few seconds

  • After install this plugin my I observed this in my slow query log –

    # Time: 131216 23:22:46
    # Query_time: 31.531834  Lock_time: 0.000157 Rows_sent: 0  Rows_examined: 2737546
    SET timestamp=1387236166;
    SELECT id, SUM(hits) FROM wp_PopularityPostsWidgetCache WHERE date > DATE_SUB(CURDATE(), INTERVAL 30 DAY)  AND IN (
    							SELECT object_id
    							FROM wp_term_relationships AS r
    								 JOIN wp_term_taxonomy AS x ON x.term_taxonomy_id = r.term_taxonomy_id
    								 JOIN wp_terms AS t ON t.term_id = x.term_id
    							WHERE x.taxonomy = 'category' AND t.term_id IN (1132,3340,3341,3395,3413,3414,3590,3738,4273,4343,4344,4345,4346,4347)
    							)  GROUP BY id ORDER BY SUM(hits) DESC LIMIT 5;

    These queries are being run every couple of seconds. Is there a way to throttle this to only run every 15 minutes or so?


  • The topic ‘Query Running every few seconds’ is closed to new replies.