Page 1 of 1
Too many sql Query Opencart
Posted: Fri Jun 11, 2021 7:17 pm
by shamim6277
Hello,
I have some problem with my website. when I will go to admin panel or upload a product then, my server take too many sql Query Like this "Sending data SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price FROM oc_product_d"
this way, my website is down.
You can tell me what's solution? Please
Opencart Version 3.0.3.3,
Server: VPS, 6 core, 16 GB RAM
theme: journal 3
info me please!
samim
thanks!
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:05 pm
by straightlight
A 6 core, 16G RAM where store owners could run Opencart on a less resourced server with these SQL queries is definitely questionable regarding this error message on that side prior to point out the addressed issue originating from the platform. In addition, it is to know if your VPS server is a managed or unmanaged server and how many data you're currently handling from the database.
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:16 pm
by shamim6277
straightlight wrote: ↑Fri Jun 11, 2021 8:05 pm
A 6 core, 16G RAM where store owners could run Opencart on a less resourced server with these SQL queries is definitely questionable regarding this error message on that side prior to point out the addressed issue originating from the platform. In addition, it is to know if your VPS server is a managed or unmanaged server and how many data you're currently handling from the database.
website product number : 4044 .
category number: 600
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:17 pm
by straightlight
shamim6277 wrote: ↑Fri Jun 11, 2021 8:16 pm
straightlight wrote: ↑Fri Jun 11, 2021 8:05 pm
A 6 core, 16G RAM where store owners could run Opencart on a less resourced server with these SQL queries is definitely questionable regarding this error message on that side prior to point out the addressed issue originating from the platform. In addition, it is to know if your VPS server is a managed or unmanaged server and how many data you're currently handling from the database.
website product number : 4044 .
category number: 600
How about this query in your PHPMyAdmin console:
Code: Select all
SELECT SUM(TABLE_ROWS)
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = '{your_db}';
by also replacing:
with your actual Opencart database name. What is the returned records count?
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:29 pm
by shamim6277
straightlight wrote: ↑Fri Jun 11, 2021 8:17 pm
shamim6277 wrote: ↑Fri Jun 11, 2021 8:16 pm
straightlight wrote: ↑Fri Jun 11, 2021 8:05 pm
A 6 core, 16G RAM where store owners could run Opencart on a less resourced server with these SQL queries is definitely questionable regarding this error message on that side prior to point out the addressed issue originating from the platform. In addition, it is to know if your VPS server is a managed or unmanaged server and how many data you're currently handling from the database.
website product number : 4044 .
category number: 600
How about this query in your PHPMyAdmin console:
Code: Select all
SELECT SUM(TABLE_ROWS)
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = '{your_db}';
by also replacing:
with your actual Opencart database name. What is the returned records count?

Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:30 pm
by straightlight
As instructed above, you also need to remove the: { and } between the database name.
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:31 pm
by by mona
Those are the normal product queries, one for every product you list in your product list so approx. 20 queries or so.
If your server goes down because of those queries, you have other issues.
Even without proper indexes on the related tables this should be no issue for even the oldest machine.
PS. better activate your windows license.
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:32 pm
by straightlight
So to add:
theme: journal 3
Is not supported on the forum.
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:33 pm
by shamim6277
straightlight wrote: ↑Fri Jun 11, 2021 8:30 pm
As instructed above, you also need to remove the: { and } between the database name.
Thanks... SUM(TABLE_ROWS) is
7681947
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:34 pm
by straightlight
shamim6277 wrote: ↑Fri Jun 11, 2021 8:33 pm
straightlight wrote: ↑Fri Jun 11, 2021 8:30 pm
As instructed above, you also need to remove the: { and } between the database name.
Thanks... SUM(TABLE_ROWS) is
7681947
That also explains some of it. See by freeing up your activity and session tables if that will help.
Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:36 pm
by shamim6277
straightlight wrote: ↑Fri Jun 11, 2021 8:34 pm
shamim6277 wrote: ↑Fri Jun 11, 2021 8:33 pm
straightlight wrote: ↑Fri Jun 11, 2021 8:30 pm
As instructed above, you also need to remove the: { and } between the database name.
Thanks... SUM(TABLE_ROWS) is
7681947
That also explains some of it. See by freeing up your activity and session tables if that will help.
How can I do that please help me!

Re: Too many sql Query Opencart
Posted: Fri Jun 11, 2021 8:40 pm
by straightlight
shamim6277 wrote: ↑Fri Jun 11, 2021 8:36 pm
straightlight wrote: ↑Fri Jun 11, 2021 8:34 pm
shamim6277 wrote: ↑Fri Jun 11, 2021 8:33 pm
Thanks... SUM(TABLE_ROWS) is
7681947
That also explains some of it. See by freeing up your activity and session tables if that will help.
How can I do that please help me!
If you don't know how to use PHPMyAdmin, you could either look on Google, create a new service request in the Commercial Support section of the forum, or contact me directly via PM on the forum to get this done as a custom job.
Re: Too many sql Query Opencart
Posted: Mon Jun 14, 2021 5:53 pm
by paulfeakins
shamim6277 wrote: ↑Fri Jun 11, 2021 8:36 pm
How can I do that please help me!
If you can't do that, you could pay a developer such as
ourselves or post a job in the
Commercial Support Forum.