Hallo,
seit 1 Tag ist mir aufgefallen, dass unser Shop ziemlich langsam läuft. Unser Hoster meint dazu, dass folgender Querie ständig aufgerufen wird:
SET timestamp=1528195885;
SELECT SQL_CALC_FOUND_ROWS product.id as __product_id, variant.id as__ variant_id, variant.ordernumber as __variant_ordernumber FROM s_articles product
INNER JOIN s_articles_details variant ON variant.id = product.main_detail_id
AND variant.active = 1
AND product.active = 1
LEFT JOIN s_articles_avoid_customergroups avoidCustomerGroup ON avoidCustomerGroup.articleID = product.id AND avoidCustomerGroup.customerGroupId IN (1) INNER JOIN s_articles_categories_ro productCategory ON productCategory.articleID = product.id AND productCategory.categoryID IN (467) INNER JOIN (SELECT prices.*, MIN(ROUND(prices.price * availableVariant.minpurchase * ((100 - IFNULL(priceGroup.discount, 0)) / 100) * (( (CASE tax.id WHEN 1 THEN 19 WHEN 4 THEN 7 END) + 100) / 100) * 1, 2)) as cheapest_price FROM s_articles product INNER JOIN s_core_tax tax ON tax.id = product.taxID INNER JOIN (SELECT `id`, `pricegroup`, `from`, `to`, `articleID`, `articledetailsID`, `price`, `pseudoprice`, `baseprice`, `percent` FROM s_articles_prices defaultPrice WHERE defaultPrice.pricegroup = 'EK') prices ON product.id = prices.articleID INNER JOIN s_articles_details availableVariant ON availableVariant.articleID = product.id
AND availableVariant.active = 1 LEFT JOIN s_core_pricegroups_discounts priceGroup ON priceGroup.groupID = product.pricegroupID
AND priceGroup.discountstart = 1
AND priceGroup.customergroupID = '1'
AND product.pricegroupActive = 1 WHERE (prices.articledetailsID = availableVariant.id) AND (prices.from = 1) GROUP BY product.id) listing_price ON listing_price.articleID = product.id INNER JOIN s_articles_attributes productAttribute ON productAttribute.articledetailsID = variant.id WHERE avoidCustomerGroup.articleID IS NULL GROUP BY product.id ORDER BY listing_price.cheapest_price ASC, product.id ASC;
Könnt Ihr mir helfen und mir mitteilen, wo ich ansetzen kann?
Danke