Skip to content

class-wp-statistics-install.php - no index for field "ip" at table useronline & visitor #414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sufehmi opened this issue Oct 8, 2022 · 1 comment

Comments

@sufehmi
Copy link

sufehmi commented Oct 8, 2022

Hi, a client of mine recently contacted me and reported that their website was down. After checking everything, I found out that the MySQL server is overloaded with the following queries:

SELECT `location` FROM wp_statistics_visitor WHERE ip = '88.88.88.88' 

SELECT * FROM wp_statistics_useronline WHERE ip = '99.99.99.99'     

I checked, and turned out there's no index for those fields.

So I execute the following command in MySQL :

alter table wp_statistics_useronline add index (ip);
alter table wp_statistics_visitor add index (ip);

And in an instant the website was up again, and CPU utilization in both webserver & database server went down to almost zero.

FYI, thank you.

@mostafasoufi
Copy link
Member

The index ip is added to those tables and will be released in the next update.

Thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants