WP Statistics – High Database Load / Slow Queries
-
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 rowswp_statistics_useronline→ thousands of rowswp_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(*) FROMwp_statistics_pagesWHEREtype= ''; -- 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 FROMwp_statistics_useronlineWHERE timestamp < '1756340395'; -- Rows_examined: 109,006 SELECT SUM(visit) FROMwp_statistics_visit; -- Rows_examined: 78What I tried:
- Added indexes to improve query performance.
- Checked counts for different tables to see how much data there is.
- Tried a
mysqldumpbackup 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:
- Has anyone optimized WP Statistics for large databases?
- What configuration or indexes help prevent server overload?
- 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]
- Large number of records in tables:
The topic ‘WP Statistics – High Database Load / Slow Queries’ is closed to new replies.