V
V
veltolo2019-03-01 01:10:38
MySQL
veltolo, 2019-03-01 01:10:38

How to reduce the number of queries in the database. WooCommerce (1200 queries to db)?

Hello! Help me understand this situation:
I have a website - Wordpress + WooCommerce + ~10 more plugins. WooCommerce has 1000 empty categories with no products.
So I turn off WooCommerce - as a result I have 107 requests in the admin panel and 221 on the main page
And with WooCommerce enabled - I get ~ 1160 requests in the admin panel and about the same on the main page
By the way .. on other pages of the site the situation does not change, so that there is nothing supernatural on the main page.
When disabling all plugins but leaving WooCommerce, the situation does not change much - about 1000 requests.
Object caching with Redis helped me, requests are immediately reduced to ~ 36. But suddenly the base of goods will grow to 100K and the categories of goods will increase by another 1000, then what? I feel that one day I will press, so I want to solve the problem at the initial stage. I hope for your help, thank you all in advance for the answers.
UPDATE 03/02/19 : In the wp admin panel now the normal number of requests is ~90, it was a clumsy plugin for the page builder - it created sooo many requests, I saw it in the query monitor - before that I didn’t pay attention to something, I sinned on the same woocommerce.
PS: Now I have deleted about 120 categories - requests have decreased by the same amount.
from custom when creating a category only: icons that are displayed next to the name in the menu.
UPDATE 02.03.19 17:48Problem solved :) It sounds strange, but it was solved by removing the drop-down list of categories from the SEARCH FIELD (from the topic) (that is, before it was possible to choose which taxonomies to search for), now the number of requests has returned to normal.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
F
FOcuswOwX, 2019-03-01
@FOcuswOwX

Do not make an online store on WordPress.

I
Igor Khabursky, 2019-05-08
@horinych

I have 3100 items. Tons of categories and tags. Lots of filters in the sidebar. Everything works perfectly. Recently I read about testing woocommerce with 50,000 products and everything was within the normal range. In addition, I myself climbed various sites and saw that on the same opencart or magento it is also possible to kill the server))) I came across tough turtles (or dinosaurs). If I'm not mistaken, magento creates a lot more requests compared to the default wokomers. At the extreme, you can put the Hard Bit Control plugin to adjust the frequency of requests.

A
Anatoly, 2019-03-01
@Tolly

The question IMHO is a little delusional that there is a plug-in - a black box.
How to improve it? The question is obvious - will turn to the developers.
What can be done to optimize the store? Write your own plugin, or use a ready-made solution.
I will not talk about caching, since the question is not about that.
I also do not advise you to pay for the completion of the plugin, since the plugin is being updated.
Something like this..

E
Evgeniy Ivanov, 2019-03-01
@cpanelhostig

Profiling with the Sql Query plugin. It will show you what's wrong and you can fix it.

I
Ivan, 2021-01-17
@youmixx

So what to do then

E
Elio Don, 2022-04-12
@elmurzaalchakov

Install the cron event control plugin, there will be an event that repeats every minute, increase the interval (I have once a week), the load will drop

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question