• Resolved shqipcinema

    (@shqipcinema)


    Hi everyone,

    I’m having trouble with WP Statistics on my site. When the plugin runs, it seems to cause a high load on my database. My site works fine when the plugin is disabled, but I want to use it safely.

    Here’s what’s happening:

    • Large number of records in tables:
      • wp_statistics_pages → 109,020 rows
      • wp_statistics_useronline → thousands of rows
      • wp_ewwwio_images → 24,012 images pending updates, 4,072 pending processing
    • Some queries take a long time and scan lots of rows.
    • I tried adding indexes, but some queries still examine huge amounts of data.

    Slow query examples from MySQL logs:

    SELECT COUNT(*) FROM wp_statistics_pages WHERE type = ''; -- Rows_examined: 109,012 SELECT COUNT(*) FROM wp_statistics_useronline AS useronline JOIN wp_statistics_visitor AS visitor ON useronline.visitor_id = visitor.ID; -- Rows_examined: 72 DELETE FROM wp_statistics_useronline WHERE timestamp < '1756340395'; -- Rows_examined: 109,006 SELECT SUM(visit) FROM wp_statistics_visit; -- Rows_examined: 78

    What I tried:

    1. Added indexes to improve query performance.
    2. Checked counts for different tables to see how much data there is.
    3. Tried a mysqldump backup but hit permission issues (PROCESS privilege).

    Current situation:

    • Plugin is disabled.
    • I want to reactivate WP Statistics safely without overloading my database.

    Questions for the community:

    1. Has anyone optimized WP Statistics for large databases?
    2. What configuration or indexes help prevent server overload?
    3. Any tips for cleaning or managing old statistics safely?

    Thanks in advance for any help or advice!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @shqipcinema,

    Thank you for sharing the detailed information.

    You are correct, for websites with very high traffic (for example, around 1,000 concurrent users), WP Statistics can put additional load on the database, especially when monitoring online users.

    The good news is that starting from version 14.16, we have addressed this database performance issue, and the plugin will run much more efficiently in such scenarios.

    As a temporary workaround, we recommend disabling online visitor monitoring if possible:
    Go to Statistics > Settings > General > Monitor Online Visitors and turn it off.

    This should help reduce the immediate load until the new release is available.

    We appreciate your patience and thank you for using WP Statistics.

    Best regards,
    Mehmet

    Thread Starter shqipcinema

    (@shqipcinema)

    Thank you for the reply!

    My website doesn’t have that much views ( there were aprox. 70 users online ) However with some database cleanups and modifications of the tables I now managed to lay them low

    Hi @shqipcinema,

    I’m glad to hear everything is running smoothly now.

    You can also use Statistics > Optimization > Data Clean Up to further manage your database and improve performance.

    Best regards,
    Mehmet

    Hi @shqipcinema,

    Since we haven’t heard back from you in a while, I’ll go ahead and mark this ticket as resolved for now. Of course, if you need further assistance at any point, feel free to reopen the thread or send us a new message
    We’ll be happy to help.

    Best regards,
    Mehmet

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WP Statistics – High Database Load / Slow Queries’ is closed to new replies.