soporte.olalon Posted April 11 Share Posted April 11 Qué tal, el proveedor de mi hosting me ha enviado el siguiente mensaje diciendo que una consulta de SQL está saturando al 100% los recursos de mi servidor. Ahora pongo la consulta, pero me dice esto: "tendrás que revisar si tienes activa y configurada la búsqueda por categorías pues estos picos de uso de cpu por parte de estas consultas vienen por esto" Y aquí aquí dejo la consulta de SQL: SELECT p.id_manufacturer, COUNT(DISTINCT p.id_product) c FROM (SELECT p.id_product, p.id_manufacturer, SUM(sa.quantity) as quantity, p.condition, p.weight, p.price, psales.quantity as sales, p.on_sale, p.date_add, cp.position FROM ps_product p LEFT JOIN ps_product_attribute pa ON (p.id_product = pa.id_product) LEFT JOIN ps_product_attribute_combination pac ON (pa.id_product_attribute = pac.id_product_attribute) LEFT JOIN ps_stock_available sa ON (p.id_product = sa.id_product AND IFNULL(pac.id_product_attribute, 0) = sa.id_product_attribute AND sa.id_shop = 1 AND sa.id_shop_group = 0 ) LEFT JOIN ps_product_sale psales ON (psales.id_product = p.id_product) INNER JOIN ps_category_product cp ON (p.id_product = cp.id_product) INNER JOIN ps_product_shop ps ON (p.id_product = ps.id_product AND ps.id_shop = 1 AND ps.active = TRUE) INNER JOIN ps_category c ON (cp.id_category = c.id_category AND c.active=1) LEFT JOIN ps_category_group cg ON (cg.id_category = c.id_category) LEFT JOIN ps_feature_product fp ON (p.id_product = fp.id_product) LEFT JOIN ps_feature_product fp_1 ON (p.id_product = fp_1.id_product) LEFT JOIN ps_feature_product fp_2 ON (p.id_product = fp_2.id_product) LEFT JOIN ps_feature_product fp_3 ON (p.id_product = fp_3.id_product) WHERE ((fp.id_feature_value IN (635, 634))) AND ((fp_1.id_feature_value=758)) AND ((fp_2.id_feature_value IN (1239, 1254, 1241))) AND ((fp_3.id_feature_value=650)) AND ps.id_shop='1' AND ps.visibility IN ('both', 'catalog') AND cg.id_group='1' AND c.nleft>=11 AND c.nright<=12 GROUP BY p.id_product) p LEFT JOIN ps_feature_product fp ON (p.id_product = fp.id_product) LEFT JOIN ps_feature_product fp_1 ON (p.id_product = fp_1.id_product) LEFT JOIN ps_feature_product fp_2 ON (p.id_product = fp_2.id_product) LEFT JOIN ps_feature_product fp_3 ON (p.id_product = fp_3.id_product) WHERE ((fp.id_feature_value IN (635, 634))) AND ((fp_1.id_feature_value=758)) AND ((fp_2.id_feature_value IN (1239, 1254, 1241))) AND ((fp_3.id_feature_value=650)) GROUP BY p.id_manufacturer Tengo la version de Prestashop 8.1.7 Gracias! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now