• iprg

    (@iprg)


    Hi, first let me thank you fot this lovely plugin, I have been using for nearly ten years.. Today, I updated from 3.0.0. to the latest release and the plugins clearly slows down the administration… When debug with Query monitor, it shows the query to take up to 2 seconds… (I do not show it on the dashboard, but is still happens). Perhaps, the fault is on my side – when I back up the site, Updraft warns me that “top_ten_daily has very many rows (2091806)”… What is the best way to fix it? I would love the keep the plugin and statistics… Thank you! Jan

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ajay

    (@ajay)

    Is that the query that QM is flagging is slow i.e. the one referring to this table?

    You can turn on the maintenance in the settings page. This only retains about 180 days of data in the daily tables. Most users would unlikely need more than that.

    Thread Starter iprg

    (@iprg)

    Thank you so much Ajay!
    – yes, it is the same table
    – I have the maintenance on, Enable scheduled maintenance should be active, but does not work for a reason
    – if I manually erase the db column with the daily stats, will the overal stats be safe? (I do not need daily stats that much, but the totals are very valuable for me)

    Thank you!!

    Jan

    Plugin Author Ajay

    (@ajay)

    @iprg

    As always, backup your database before making any changes.

    Yes you can manually clean up the daily tables but you’ll look all the statistics till they fill up again. Overall stats are stored in the wp_top_ten table against each post.

    Can you try turning off and then turning back on the maintenance – this should redo the cron job that does the clean. It runs once daily and cleans up anything that is older than the 180 day limit.

    Thread Starter iprg

    (@iprg)

    Dear Ajay, thanks again! I truncated the db daily table, i helped a bit, but the site is still much slower than i was before in some operations (opening the list of posts, opening of another custom post page)… Does it make any sense?
    – I was updating from WP 5.8 to current 6.1
    – downgrade from current Top 1O to 3.0.0 did not help, still slow – so it seems like something happened in the WP as such? (was working great on WP 5.8 and 3.0.0)
    – when I deactiva Top 1O, the dashboard is quick again…
    – does it make any sense?

    Thanks again!!
    Jan

    Plugin Author Ajay

    (@ajay)

    Something has definitely gone wrong with the db I think. Please backup your database before trying this.

    In the Tools page you’ll find a set of buttons. One is to recreate the indices – please give that a shot first. Then there are other buttons to recreate the entire tables.

    Can you give the first and then the second options a go to see if that helps.

    I’m running Top 10 on 6.1 across all my sites and don’t see any issues so definitely not a compatibility problem.

    Thread Starter iprg

    (@iprg)

    Dear Ajay, once more, thank you so much for your help! I did all this things, incl Recreate db tables, but it did not help..
    But, I have some theories:
    – when I turn off the option “Page views in admin”, problem is solved, the posts page (the listing of posts in the Dashboard) open quickly
    – the same for another listing from a category plugin
    – so probably really something went wrong with db, which sends heavy loads somewhere
    – plus: when I did export, the csv shows me some 7000 lines, which is strange, because my blog has, maybe, 500 posts… So perhaps, it is tracking something else?
    Do not you see what might be causing all this?
    Thank you!

    Ja

    Plugin Author Ajay

    (@ajay)

    Are you having an issue with another plugin on the Admin page? I’m wondering if it is an issue with your wp_posts table which will then trickle to everything else.

    You could try to some kind of a database cleaning/optimising plugin to see if that makes a difference.

    Are you exporting daily or overall? Daily is tracked with an hour per entry per post so can add up quickly.

    Thread Starter iprg

    (@iprg)

    Hi and thanks!
    No, I do not see any other issue with another plugin, but cannot exclude it, of course. But it takes under 2 seconds (QM) to open page with posts without stats and cca 10 seconds when it is activated (plugin or Page views in admin)

    I was exporting totals, so I have 7000 lines of data, three columns: Post ID / Visits / Blog ID, all the Post IDs are different, so clearly it registers up to 7000 items, out of which only cca 500 could be posts… Looks strange to me…

    Thanks again and sorry for so much confusion!! Jan

    Plugin Author Ajay

    (@ajay)

    I’ve been thinking about this. On the export, I have a feeling the extra post IDs are revisions – I noticed this tracked in my database as well. I’ll write a clean-up script that should knock these off and probably put that into the maintenance script as well. It could also be attachments.

    Can you randomly check post IDs to see what they are? You can check it in the database directly.

    In terms of the plugin, I think we need to do something more drastic i.e. a complete cleanup and reinstall.

    However, please backup the databases and counts before you proceed. Especially backup wp_top_ten and wp_top_ten_daily from the DB

    Likely the quickest way to do this is to Enable Delete Option and Delete counter data on uninstall in the General tab.

    Then deactivate and delete the plugin from the Plugins page. Doublecheck that the tables wp_top_ten and wp_top_ten_daily have been deleted.

    Optionally, or ideally, optimize the wp_posts table. There are plugins that optimise the db or alternatively just run it in phpMyAdmin.

    Then do a fresh install of the plugin and check how the speed of everything is. Hopefully this is all fine especially given you have an empty table for Top 10.

    You can then reimport the counts via the Tools page or alternatively via the DB (data only and not the full structure)

    Thread Starter iprg

    (@iprg)

    Dear Ajay, thank you so much for your time, I am really grateful for your help…
    1. I did some digging in the db and: I do not think your plugin tracks post revisions in my case, but it clearly tracks photos… And since my web is about photography, there can really be thousands of them (the export table of the overal stats has nearly 7000 lines when imported to excel so it probalby slows everything down.. Can I limit the it to the posts only a remove the stats for photos?
    2. If I, as you suggest, delete the plugin and restore the stats via the export tool, will it help? Because, again, I will upload the 7000 lines (only for overal stats, I do not need daily stats too much).
    Thanks!
    Jan

    Plugin Author Ajay

    (@ajay)

    @iprg

    1. If you don’t need the daily counts, you can disable the daily counter in the settings page. There isn’t a way to not track certain post types as the plugin is designed to track every post type visited.

    2. I think this might be the only option as everything I could think of doesn’t seem to have made a difference.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Slow site after update’ is closed to new replies.