D
D
Denis Shishkin2016-11-15 02:52:16
PHP
Denis Shishkin, 2016-11-15 02:52:16

900 database queries on wordpress, how to find the reason?

There is an online store wordpress + woocommerce. It takes a very long time to load, up to 10-12s. By Google pagespeed, almost everything was optimized by joxi.ru/52an5v6TXyXVA0, by pingdom, here are the results joxi.ru/823L9zBHYBYZAO I
looked, when loading the main page, 900 requests to the database joxi.ru/Q2Ke5L9HQ8QYrj come out. Is that a lot? How can you find the cause?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis Yanchevsky, 2016-11-15
@deniscopro

How can you find the cause?

The Query Monitor plugin is supposed to help.

R
Rou1997, 2016-11-15
@Rou1997

By google pagespeed

Google itself has this "pagespeed" in deep ... depression! Take their forum, and YouTube, and others too, take Android and Android Studio, well, obviously speed is not their forte, I'm amazed that they have a service with that name and I doubt very much its effectiveness.
Yes.
Debugging PHP, which is somehow executed when the page is loaded.
Wordpress has its own class for working with the database, usually it is implemented through it, find its code and insert logging with stacktrace, find out where the calls come from.

I
Igor Vorotnev, 2016-11-15
@HeadOnFire

+1 to Denis Yanchevsky 's answer , but you have a problem with more than just that. The fact is that you have the server response itself a little more than 2 seconds. Yes, it's still a lot, and the problem in the first place is probably also slow hosting. A faster server + caching + bottleneck refactoring will help cut that 2.5 seconds down to, say, 0.5. But where does your other 5 seconds go? This is clearly a front end. Of these, another 2 seconds is an Ajax basket, which loses the same time on the server's response. But at the same time, what else is going on?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question