Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have asked at the plugin's (WordPress Popular Posts) support a few days ago, since no response hope to get some insight or help here. Thanks.

Hesitant to tweak settings like max_heap_table_size & tmp_table_size because kind of (naively?) hoping that such a popular plugin has a way of managing load.

On a rather popular site on a VPS the host is asking us to investigate constant, frequent tmp writes that is increasing server load. Any ideas on how to manage / decrease these?

Example:

Copying to tmp table | SELECT p.ID AS 'id', p.post_title AS 'title', p.post_date AS 'date', p.post_author AS 'uid' , ( IFNULL(v.pageviews, 0)/(IF ( DATEDIFF('2013-02-25 12:07:23', MIN(v.day)) > 0, DATEDIFF('2013-02-25 12:07:23', MIN(v.day)), 1) )) AS 'avg_views' FROM XXXXXX_posts p LEFT JOIN (SELECT id, SUM(pageviews) AS 'pageviews', day FROM (SELECT id, pageviews, day FROM XXXXXX_popularpostsdatacache WHERE day > DATE_SUB('2013-02-25 12:07:23', INTERVAL 1 WEEK) ORDER BY day) sv GROUP BY id) v ON p.ID = v.id WHERE p.post_status = 'publish' AND p.post_password = '' AND p.post_type IN('post','page') GROUP BY p.ID HAVING avg_views > 0.0000 ORDER BY avg_views DESC LIMIT 5 |
share|improve this question
    
If the site gets a lot of traffic you're best off passing this job to another service, either your analytics or the analytics provided by addthis.com or similar. To do it in WP there's no good way around the number of table writes if you're logging views. –  sanchothefat Feb 26 '13 at 9:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.