News:

Looking for documentation? Take a look on our wiki

Main Menu

mod_cf_filtering maybe optimize memory ^_^ ?

Started by 2dmaster, November 20, 2016, 21:31:39 PM

Previous topic - Next topic

2dmaster

public_html\modules\mod_cf_filtering\optionsHelper.php (7 hits) ::
How to minimize memory limit by this module mod_cf_filtering ? i no have child products.. and please help... i got MySQL connect error at hosting.. when many users...
all optimization`s on CMS and cache enabled.. j3.6.4. my tech support say - this request crashes mysql :
SELECT SUM(CASE WHEN p.product_parent_id=0 THEN 1 ELSE 0 END) AS counter,langt.category_name AS name i found this line`s in code::
Line 563: if($this->componentparams->get('returned_products','parent')=='child')$query->select("SUM(CASE WHEN p.product_parent_id>0 THEN 1 ELSE 0 END) AS counter");
Line 567: if($this->componentparams->get('filtered_products','parent')=='parent')$query->select("SUM(CASE WHEN p.product_parent_id=0 THEN 1 ELSE 0 END) AS counter");
Line 1018: if($this->componentparams->get('returned_products','parent')=='child')$query->select("SUM(CASE WHEN p.product_parent_id>0 THEN 1 ELSE 0 END) AS counter");
Line 1022: if($this->componentparams->get('filtered_products','parent')=='parent')$query->select("SUM(CASE WHEN p.product_parent_id=0 THEN 1 ELSE 0 END) AS counter");
Line 1376: if($this->componentparams->get('returned_products','parent')=='child')$query->select("SUM(CASE WHEN p.product_parent_id>0 THEN 1 ELSE 0 END) AS counter");
Line 1380: if($this->componentparams->get('filtered_products','parent')=='parent')$query->select("SUM(CASE WHEN p.product_parent_id=0 THEN 1 ELSE 0 END) AS counter");

GJC Web Design

you need to contact the developer.. there is no support of 3rd party extensions here sorry
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

I think this query need really to be optimized. But only support know what this return, to set right query.
But "SUM(CASE WHEN p.product_parent_id=0 THEN 1 ELSE 0 END) AS counter" is a very slow query.

Studio 42

Deprecated, do not mean, it not work.
Simply change the log error level(or use joomla vonfig to change it)
But i think, that this query can use mysql count(XXX) as counter, this is very quick. But as explained only the dev can check for the exact query to change.