Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter kiwibird

    (@kiwibird)

    Thank you for your reply, I am looking forward to this useful plugin getting better and better.

    Thread Starter kiwibird

    (@kiwibird)

    After 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.

    Thread Starter kiwibird

    (@kiwibird)

    Because 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.png

    • 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.
    Thread Starter kiwibird

    (@kiwibird)

    I 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.
    Thread Starter kiwibird

    (@kiwibird)

    I 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.
    Thread Starter kiwibird

    (@kiwibird)

    i 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

    Thread Starter kiwibird

    (@kiwibird)

    Hello, 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 |
    +——+————-+——————+——–+———————————————-+———+———+——————————————–+———+———————————————-+

    • This reply was modified 7 years, 8 months ago by kiwibird.
    • This reply was modified 7 years, 8 months ago by kiwibird.
    Thread Starter kiwibird

    (@kiwibird)

    I recreated the index and i will observed it for a while.Thanks for you help

    I 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.

    • This reply was modified 8 years, 3 months ago by kiwibird.
    • This reply was modified 8 years, 3 months ago by kiwibird.
Viewing 9 replies - 1 through 9 (of 9 total)