TD-COMPOSER responsible for 8 out of 8 slow queries in my site.

Posted in: Newspaper
Post count: 77

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

Post count: 35449

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!

Post count: 77

Hi Calin,

I am trying to post you a reply here, but I am thrown this error:

https://ibb.co/1sbGHDH

What’s wrong?

Post count: 77

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.

https://ibb.co/9wwn68t
https://ibb.co/M5TNfdT

Post count: 35449

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!

Post count: 77

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.

Post count: 35449

I see.
Also, if you are using the view post count element in posts, please disable it and the posts should load faster and consume less resources.
Please let me know the results.

Post count: 77

Hi Calin,

Thanks for the additional tip. Unfortunately we are not using that, so that is not an option towards lightening things up a bit.

Thanks.

Post count: 77

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.
Post count: 35449

Hi,
Thank you for sharing with us! I pass this information to our developers.
Have a great weekend!

Post count: 77

Hi Calin,

Thank you for escalating this to the appropriate team. I look forward to hearing from you.

Have a good one!

Post count: 41

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.

https://www.xtechkr.com/optimize-newspaper-theme/

Post count: 77

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.

Post count: 77

Hi, do you have any updates on the progress of this maybe? Thanks.

Post count: 27

check

Viewing 15 posts - 1 through 15 (of 15 total)
The forum ‘Newspaper’ is closed to new topics and replies.