kiwibird
Forum Replies Created
-
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryThank you for your reply, I am looking forward to this useful plugin getting better and better.
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryAfter testing for a week.I found this plugin is useful but when runinng on a large site.The sql its made is a big performance issue can cause database down again and again.So i give up this plugin. Thanks for yuor amazing work.
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryBecause of my poor english.Maybe I can’t express my meaning very well.
But i found a project may said what i want to said…..https://github.com/10up/Async-Transients
That its said is my thought….
https://i.postimg.cc/28qmm4y7/image.pngForum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryI really have multiple widget using different period range.
But i found the same sql is totally same,if the multiple sql is made from diferrent widget ,the time in the sql should be different .
AND dp_date >= ‘2018-10-05 0’I think that means when the cache expire but not generated complete because of the slow database query.And then the next requests is coming.So many query directly made so many sql,so the database have many process to running these sql,that will cause database high load.After the first query is complete,the cache has been generate. And after the cache generated,widget will read from the cache and database work well.
And huge size of the wp_top_ten_daily table is because i have nearly 40 million posts,i have no idea to reduce it
my setting is in the image.
https://i.postimg.cc/TwQtb6Wr/image.jpg
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
- This reply was modified 7 years, 8 months ago by kiwibird.
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryI think the widgets should always read data from the cache, and every time the cache time is up, refresh the cache,when the refresh cache process is running,the widgets shoud use old cache data so even if it runs very slowly, it won’t cause database slow.
- This reply was modified 7 years, 8 months ago by kiwibird.
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryi found there are many same sql at same time. my cache time is hour. i think after the cache has expired, too many sql running at same time cause database slow.
SELECT DISTINCT ID, postnumber, SUM(cntaccess) as sum_count FROM wp_top_ten_daily INNER JOIN wp_posts ON postnumber=ID WHERE 1=1 AND blog_id = 1 AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘inherit’) AND dp_date >= ‘2018-10-05 0’ AND wp_posts.post_type IN (‘post’) GROUP BY postnumber ORDER BY sum_count DESC LIMIT 0, 50
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryHello, after a few days, I found the query is also very slow.
below is the query explain.
explain SELECT DISTINCT ID, postnumber, SUM(cntaccess) as sum_count FROM wp_top_ten_daily INNER JOIN wp_posts ON postnumber=ID WHERE 1=1 AND blog_id = 1 AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘inherit’) AND dp_date >= ‘2018-09-29 0’ AND wp_posts.post_type IN (‘post’) GROUP BY postnumber ORDER BY sum_count DESC LIMIT 0, 50+——+————-+——————+——–+———————————————-+———+———+——————————————–+———+———————————————-+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+——+————-+——————+——–+———————————————-+———+———+——————————————–+———+———————————————-+
| 1 | SIMPLE | wp_top_ten_daily | index | PRIMARY | PRIMARY | 21 | NULL | 1686564 | Using where; Using temporary; Using filesort |
| 1 | SIMPLE | wp_posts | eq_ref | PRIMARY,bk2,wp_posts_idx_type_status_date_id | PRIMARY | 8 | wordpress.wp_top_ten_daily.postnumber | 1 | Using where |
+——+————-+——————+——–+———————————————-+———+———+——————————————–+———+———————————————-+Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] slow database queryI recreated the index and i will observed it for a while.Thanks for you help
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] Slow website after update to v2.5.6I have the same problem.
Recreate Primary Key delete primary keys in table but not create new primary key
And i have cache enable for 1 hour.
Every hour when fetch new data from database.my database is fully hang.