• Since the update, the server is running extremely slowly. Websites are unavailable because of too many SQL connections. And if they are reachable, usually only with considerable waiting time.

    We’ve already raised the cache and tweaked some settings, but it seems that the cause is a particular SQL statement, which is invoked time and time again:

    ->
    SELECT DISTINCT ID, postnumber, SUM (cntaccess) as sum_count FROM wrwpdb_top_ten_daily INNER JOIN wrwpdb_posts ON postnumber = ID WHERE
    1 = 1 AND blog_id = 1 AND (wrwpdb_posts.post_status = ‘publish’ OR wrwpdb_posts.post_status = ‘inherit’) AND dp_date> = ‘2018-01-01 0’
    AND wrwpdb_posts.post_type IN (‘post’) GROUP BY postnumber ORDER
    BY sum_count DESC LIMIT 0, 25;
    <-

    The table wrwpdb_top_ten_daily now contains over 1.5 million entries. When querying, temporary tables are created (by MySQL) so that the data can be managed.

    Can the number of entries be reduced? Or am I doing something wrong?
    I have already deleted the plugin and reinstalled and have the same problem.

    • This topic was modified 7 years, 2 months ago by siragef.
Viewing 1 replies (of 1 total)
  • Plugin Author Ajay

    (@ajay)

    You can turn on the maintenance in the settings page that will delete older entries from the daily tables. You don’t need these usually if you’re limiting daily views to a few weeks. Limit is 90 days so far and can be overridden by using a filter function to change the number of days from 90.

    Also, can you please check if you have a PRIMARY KEY in the table?

Viewing 1 replies (of 1 total)
  • The topic ‘After Update Website is running extremely slow’ is closed to new replies.