Hi TD team,
I have been having issues with my site loading slow, and it all comes down to 8 queries taking as long as a quarter of a second to execute (one of them 8). Please advise what should I change in my settings to make it load faster, and help take some of the load off the database. It is so intensive it is occasionally crashing my database! I have used Query Monitor plugin to discover the slow queries.
Please see the following screenshots and advise. Cheers!
https://ibb.co/mtK8k6W
https://ibb.co/ZV5ySDm
https://ibb.co/cgJ7QwJ
Hi,
Those queries seems to be from some blocks that are set on that page. Do you have 8 blocks on the page from where was provided those details? Each block is making a new query to the database.
Can you make a tests on a post, the problem is the same?
Also, can you please provide a link to the website to make some investigations too!
Thank you!
Hi Calin,
I am trying to post you a reply here, but I am thrown this error:
What’s wrong?
Okay, I reckon it’s something to do with SQL injection protection layer?
I am posting you my answer as an image to bypass what is restricting me from posting. Apologies for not being able to copy paste the content.
Hi,
Yes, certain content is not allowed to be posted on the forum (as a precautionary measure).
These seem to be the queries that are blocks made. Maybe they can be optimized if the page is removed (https://i.imgur.com/7D8ucnt.png).
If you can do a staging or put your site on a subdomain we would like to connect to the site and see what we can do to improve these queries.
Let me know if you agree with this!
Thank you!
Hi Calin,
Thanks for the suggestions. We have tried both without much success (staging and subdomain). The size of the installation doesn’t help either. It is already north of 50GB, and as you would agree, things are moving slow with such tasks.
I will try removing the pagination features selectively and see how it’s going, and I’ll let you know.
Thanks.
In case it can be of help to your team, I had created this SO thread at the same time as posting here, to help accelerate things a bit. I am sharing the link here. Perhaps it contains some useful tips for optimizing those queries?
https://stackoverflow.com/questions/71532089/where-to-start-to-optimize-slow-wp-sql-query
Perhaps starting with the first suggestion to remove SQL_CALC_FOUND_ROWS would help indeed?
-
This reply was modified 4 years by
Redlemon.
I was able to get my page load time to well under two seconds following this guide. Cloudlfare helped tremendously. I use them for DNS.
That is a legit walkthrough of very helpful suggestions, 90% of which I have already done on my site also. Of the remaining 10% some don’t apply in my case (e.g. believe it or not I don’t use CF7) or I simply need things that they are suggesting I deactivate. Thanks for the share anyway.