Jump to content

Ps is so very slow,always keep cpu usage at 100%, i find getProducts in category.php make this happened;


ding

Recommended Posts

here is the echo category.php:



SELECT p.*, pa.`id_product_attribute`, pl.`description`, pl.`description_short`,


pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, 

pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`, il.`legend`,

m.`name` AS manufacturer_name,


tl.`name` AS tax_name, t.`rate`, cl.`name` AS category_default, 

DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL 3 DAY)) > 0 AS new, 

(p.price - IF((DATEDIFF(reduction_from, CURDATE()) <= 0 AND DATEDIFF(reduction_to, CURDATE()) >=0) OR reduction_from = reduction_to, IFNULL(reduction_price, (p.price * reduction_percent / 100)),0)) AS orderprice 

FROM `ps_category_product` cp

LEFT JOIN `ps_product` p ON p.`id_product` = cp.`id_product` 

LEFT JOIN `ps_product_attribute` pa ON (p.`id_product` = pa.`id_product` AND default_on = 1)

LEFT JOIN `ps_category_lang` cl ON (p.`id_category_default` = cl.`id_category` AND cl.`id_lang` = 1) 

LEFT JOIN `ps_product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1) 

JOIN `ps_image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1) 

JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 1) 

LEFT JOIN `ps_tax` t ON t.`id_tax` = p.`id_tax` 

LEFT JOIN `ps_tax_lang` tl ON (t.`id_tax` = tl.`id_tax` AND tl.`id_lang` = 1) 

LEFT JOIN `ps_manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` 

WHERE cp.`id_category` = 1 AND p.`active` = 1 ORDER BY cp.`position` DESC LIMIT 0,10

Link to comment
Share on other sites

  • 2 months later...

Same problem after update this query is awesome slow and i read entire forum and no solution just bla bla, this is unbelievable you guys fix some things and broke another.

The server is HP proliant ML350 G4 and is fully dedicated for prestashop, 24h after update apache/mysql services are lagged with 100% cpu ussage
now i should go back to old version.
Just make 1 version to work OK, and i will never update it.... PS is not for production :(

Link to comment
Share on other sites

  • 3 weeks later...

There must be some glitch in your setup, or an unlucky combination of OS parameters and software / versions.
I also have my own server running (Dell R200 with one Quadcore CPU) in a datacenter and I always get requests times below 0.1 sec, regardless of module or query.
What OS and software (PHP, mySQL..) are you using?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...