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.
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:
I checked, and turned out there's no index for those fields.
So I execute the following command in MySQL :
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.