Your WordPress Website is Slow? – perhaps you have WP-Statistics plugin installed?

A few days ago a client contacted me and said that their website is down. I checked the server, and indeed the server is very overloaded. In total it got 36 cores – and they’re all 100% utilized.

As usual I checked the whole stack, but today it’s something different – the MySQL / database server was the culprit. It was performing very slowly, and in turn caused the webserver to slow down as well.

In the slow query log, some queries kept showing up with crazy query times, in tens of seconds.
For comparison – all of the other queries finishes in less than a second.

MySQL’s slow query log is your friend – it enable you to find problematic queries very quickly.

And all those slow queries are in these tables:

wp_statistics_useronline
wp_statistics_visitor

I checked the currently running queries with “mysqladmin processlist“, and almost all (hundreds of them) queued queries are those involving those tables, looking for specific content in the field “ip”. They’re all looked like these:

SELECT location FROM wp_statistics_visitor WHERE ip = '88.88.88.88'
SELECT * FROM wp_statistics_useronline WHERE ip = '99.99.99.99'

On a hunch, I checked the structure of those tables. And right enough, there’s no index for “ip”

An index can increase a query’s performance by a, very, significant amount.

When the size of those tables are big enough, and you have a higher traffic than usual (they just published a very important information that’s of interest to a lot of people) – then suddenly these seemingly innocent queries were able to bring down a 36-core server to its knees.

Anyway, now we know the culprit, the solution is easy enough:

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

And voilà – in an instant, the website was up again, and the CPU utilization dropped to nearly zero.

Everyone’s happy, and I have also notified the developers about the issue as well.

104 thoughts on “Your WordPress Website is Slow? – perhaps you have WP-Statistics plugin installed?

  1. terima kasih banng infonya, ini sangat membantu untuk kecepatan website, kalo pake plugin kecepatan wordpress yang terbaik apa ya?

  2. Wow wonderful blog layout How long have you been blogging for you make blogging look easy The overall look of your site is great as well as the content

  3. Your website is a sanctuary for the seekers of profound thought, where the altar of enlightenment is adorned with the incense of your articulate expression. Each visit is a pilgrimage, and readers find solace in the intellectual serenity you provide.

  4. Bonjour, je crois que j’ai vu que vous avez visité mon blog et je suis venu vous rendre la pareille. J’essaie de trouver des choses pour améliorer mon site web et je suppose qu’il est possible d’utiliser certaines de vos idées.

  5. Hi Neat post Theres an issue together with your web site in internet explorer may test this IE still is the marketplace chief and a good component of people will pass over your fantastic writing due to this problem

  6. Your positive energy and enthusiasm radiate through your writing It’s obvious that you are truly passionate about what you do

  7. Your blog always puts a smile on my face and makes me feel better about the world Thank you for being a source of light and positivity

  8. Hi Neat post Theres an issue together with your web site in internet explorer may test this IE still is the marketplace chief and a good component of people will pass over your fantastic writing due to this problem

  9. From start to finish, this blog post had us hooked. The content was insightful, entertaining, and had us feeling grateful for all the amazing resources out there. Keep up the great work!

  10. Your blog has helped me become a more positive and mindful person I am grateful for the transformative effect your words have had on me

  11. I couldn’t stop scrolling and reading, your content is truly one-of-a-kind. Thank you for all the time and effort you put into creating such amazing content.

  12. Thank you for providing a positive and constructive space for discussion It’s refreshing to see a blog with a kind and respectful community

  13. Hey, cool post You can check if there’s a problem with your website with Internet Explorer. Because of this issue, many readers will overlook your excellent writing because IE is still the most popular browser.

  14. Wow wonderful blog layout How long have you been blogging for you make blogging look easy The overall look of your site is great as well as the content

  15. Wow superb blog layout How long have you been blogging for you make blogging look easy The overall look of your site is magnificent as well as the content

  16. obviously like your website but you need to test the spelling on quite a few of your posts Several of them are rife with spelling problems and I to find it very troublesome to inform the reality on the other hand Ill certainly come back again

  17. Its like you read my mind You appear to know a lot about this like you wrote the book in it or something I think that you could do with some pics to drive the message home a little bit but instead of that this is fantastic blog An excellent read I will certainly be back

  18. Usually I do not read article on blogs however I would like to say that this writeup very compelled me to take a look at and do so Your writing taste has been amazed me Thanks quite nice post

  19. You stretch my mind to ponder new dimensions beyond habitual ruts. Sincerest thanks for continually pushing my thinking! Encore!

  20. Fantastic site A lot of helpful info here Im sending it to some buddies ans additionally sharing in delicious And naturally thanks on your sweat

  21. upysm.com ????????????????????????????Instagram?Facebook?Youtube?????????????????????????????????????????????????????????????

  22. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation pg 1688 ????? next week, and I am at the search for such info.

  23. Its like you read my mind You appear to know a lot about this like you wrote the book in it or something I think that you could do with some pics to drive the message home a little bit but instead of that this is fantastic blog An excellent read I will certainly be back

  24. Nice blog here Also your site loads up very fast What host are you using Can I get your affiliate link to your host I wish my site loaded up as quickly as yours lol

  25. Thanks for another excellent post. Where else may anyone get that pung777 kind of information in such an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  26. Hi ??????????????? there, You have done an incredible job. I’ll certainly digg it and personally suggest to my friends. I’m sure they will be benefited from this site.

  27. Nice blog here! Also your site loads up fast! What host are you monsterxbet using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol

  28. I do trust all the ideas youve presented in your post They are really convincing and will definitely work Nonetheless the posts are too short for newbies May just you please lengthen them a bit from next time Thank you for the post

  29. Usually I do not read article on blogs however I would like to say that this writeup very compelled me to take a look at and do it Your writing style has been amazed me Thank you very nice article

  30. Thanks for another excellent post. Where else may anyone get that kind of information in such pgzeed24h an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  31. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post usun68 on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  32. Nice blog here! Also your site loads up fast! What host are you ???????? using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol

  33. Wonderful web site. Lots of useful info here. I’m sending it to a few friends ans additionally sharing in betflix119 delicious. And obviously, thanks to your effort!

  34. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation zbti9dot next week, and I am at the search for such info.

  35. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look fifarich88 forward to see you.

  36. Thanks for another excellent post. Where else may anyone get that kind of information in such an ????????? ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  37. Wonderful web site. Lots of useful info here. I’m sending it to a few friends ans additionally ????????????? sharing in delicious. And obviously, thanks to your effort!

  38. hello!,I like ????? ??????? your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  39. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next ????? week, and I am at the search for such info.

  40. Thanks for another excellent post. Where else may anyone get ????? ??????????? that kind of information in such an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  41. Nice blog here! Also your site loads up fast! What host are ?????????? ??????? you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol

  42. Thanks for ????? another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  43. Thanks for another excellent post. Where else may anyone get that kind of ???? ????? pdf information in such an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  44. Hi there, You have done an incredible job. I’ll certainly digg it and personally suggest to my friends. I’m sure they will be benefited from this ??????? site.

  45. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next week, ???????????? and I am at the search for such info.

  46. I enjoy looking through an article that can ????? make men and women think. Also, thank you for allowing for me to comment!

  47. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! ????? Taking a look forward to see you.

  48. Hi there, You have done an incredible job. I’ll certainly digg it and personally ????? suggest to my friends. I’m sure they will be benefited from this site.

  49. hello!,I like your writing very so much! proportion we keep up a ????????????? correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  50. Hi there, You have done an incredible job. I’ll certainly digg it and personally suggest to my friends. I’m sure they will gaojing 888 be benefited from this site.

  51. Hi there, You have done an incredible job. I’ll certainly digg it ????? ??? and personally suggest to my friends. I’m sure they will be benefited from this site.

  52. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal ??????????? means of writing? I’ve a presentation next week, and I am at the search for such info.

  53. ??????ggongta.com,??? ????,?????? ?? ??? ? ?? I do trust all the ideas youve presented in your post They are really convincing and will definitely work Nonetheless the posts are too short for newbies May just you please lengthen them a bit from next time Thank you for the post

  54. Wonderful web site. Lots of ????? pdf useful info here. I’m sending it to a few friends ans additionally sharing in delicious. And obviously, thanks to your effort!

  55. Thanks for another excellent ?????18+ post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  56. Wonderful web site. Lots of useful info here. I’m sending it to ???????? a few friends ans additionally sharing in delicious. And obviously, thanks to your effort!

  57. Its like you read my mind You appear to know so much about this like you wrote the book in it or something I think that you can do with a few pics to drive the message home a little bit but other than that this is fantastic blog A great read Ill certainly be back

  58. I just could not depart your web site prior to suggesting that I really loved the usual info an individual supply in your visitors Is gonna be back regularly to check up on new posts

  59. Your writing is like a breath of fresh air in the often stale world of online content. Your unique perspective and engaging style set you apart from the crowd. Thank you for sharing your talents with us.

  60. Hello my loved one I want to say that this post is amazing great written and include almost all significant infos I would like to look extra posts like this

  61. “This article is a great resource for [Topic]. I enjoyed reading your perspectives and learned a lot from this post. Thank you for sharing your knowledge!”

  62. “I found your blog post very helpful for understanding [Topic]. The way you break down the concepts makes it easy to grasp. Looking forward to more content from you.”

  63. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert ??????????? ????? pg in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  64. “I stumbled upon this blog while researching [topic], and I’m glad I did. The quality of the content speaks volumes about the credibility of the author. I’m impressed by the level of detail and the balanced perspective presented here. Kudos to the team for creating such valuable resources!”

  65. of course like your website but you have to check the spelling on several of your posts A number of them are rife with spelling issues and I in finding it very troublesome to inform the reality on the other hand I will certainly come back again

  66. Your writing is so relatable and down-to-earth It’s like having a conversation with a good friend Thank you for always being real with your readers

  67. Somebody essentially lend a hand to make significantly posts I might state That is the very first time I frequented your web page and up to now I surprised with the research you made to create this particular put up amazing Excellent job

Leave a Reply

Your email address will not be published. Required fields are marked *