Post by zaidladha » Sun May 09, 2021 2:15 pm

Hi,

Can anyone help me identify what could be using this SQL statement? Unforunately I don't get much info from the slow query log that a2hosting is giving me. We are on their prestige VPS so I am not sure why we are maxing out the resources. This query stands out as taking long as it runs against all 80,000 products. I have no clue what is triggering it. www.stevestonmarine.com and on opencart 2.3.0.2

SELECT p.product_id, p.sort_order FROM oc_product p LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id AND pd.language_id = 1) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id AND p2s.store_id = 0) LEFT JOIN oc_product_to_category p2c ON (p.product_id = p2c.product_id) LEFT JOIN oc_category_description cd ON (p2c.category_id = cd.category_id) LEFT JOIN oc_manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.date_available <= NOW() AND p.status = 1 AND ((p.product_id =

Active Member

Posts

Joined
Wed Jun 05, 2013 3:07 pm

Post by thekrotek » Sun May 09, 2021 3:20 pm

Looks like a generic query to get products.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by by mona » Sun May 09, 2021 7:59 pm

Why are you using the owl carousel for static images ? Total waste of valuable resources - both the carousel and the slideshow are very heavy to load and completely unnecessary for static images. You also have quite a lot of work to do on performance generally.

Use static images via custom html.
If you dont know how to do that - I have two modules that are very light and will do it for you - the first does loads of amazing stuff - the second can be used as a slideshow and per category/product. Both do what you want lightly.
https://www.opencart.com/index.php?rout ... n_id=33048
https://www.opencart.com/index.php?rout ... n_id=26852

However, it is so easy to do it by yourself.

Code: Select all

<div class="col-xs-12"><a href='xx'><img src="https://xxx.jpg" alt="xx" title="xx" class="xx"></a></div>
Remember to compress your images

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by paulfeakins » Mon May 10, 2021 6:41 pm

zaidladha wrote:
Sun May 09, 2021 2:15 pm
Can anyone help me identify what could be using this SQL statement?
You probably need a developer to have a look.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by halfhope » Thu May 20, 2021 11:57 pm

Hi!
This is not standart query from some module (most probably multiple-featured, that you use). This query (also as model_catalog_product->getProducts($data)) scans all records on database and getting result, and this is fine. To increase perfomance (not scan all records) SQL query shoud use index fields or woud be cached. I can help you with that.

My extensions at marketplace


User avatar
New member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - Russia, Chelyabinsk
Who is online

Users browsing this forum: No registered users and 25 guests