Nochmal zu Performance

Kann man dia Abfrage aus sArticles.php so umschreiben, dass die nicht gesamte Tabelle s_articles durchsuct? Abfrage SELECT SQL_CALC_FOUND_ROWS a.id as articleID,aDetails.id AS articleDetailsID, weight,aDetails.ordernumber,a.datum,releasedate additionaltext, shippingfree,shippingtime,instock, a.description AS description, description_long, aSupplier.name AS supplierName, aSupplier.img AS supplierImg, a.name AS articleName, topseller as highlight, IFNULL(p.price,p2.price) as price,laststock, sales, IF(p.pseudoprice,p.pseudoprice,p2.pseudoprice) as pseudoprice, aTax.tax, minpurchase, purchasesteps, maxpurchase, purchaseunit, referenceunit, unitID, pricegroupID, pricegroupActive, IFNULL(p.pricegroup,IFNULL(p2.pricegroup,‘EK’)) as pricegroup, attr1,attr2,attr3,attr4,attr5,attr6,attr7,attr8,attr9,attr10, attr11,attr12,attr13,attr14,attr15,attr16,attr17,attr18,attr19,attr20, – cd.discount, ( SELECT TRIM(GROUP_CONCAT(additionaltext SEPARATOR ‘, ‘)) as additionaltext FROM s_articles_details WHERE articleID=a.id AND additionaltext!=’’ GROUP BY articleID HAVING COUNT(*)>1 ORDER BY kind, position, additionaltext ) as variants, IFNULL((SELECT 1 FROM s_articles_groups WHERE articleID=a.id LIMIT 1),0) as sConfigurator, IFNULL((SELECT 1 FROM s_articles_esd WHERE articleID=a.id LIMIT 1),0) as esd, IFNULL((SELECT CONCAT(AVG(points),’|’,COUNT(*)) as votes FROM s_articles_vote WHERE active=1 AND articleID=a.id),‘0.00|00’) as sVoteAverange, IF(DATEDIFF(NOW(), a.datum)<=30,1,0) as newArticle, IF(aDetails.sales>=30,1,0) as topseller, IF(a.releasedate>CURDATE(),1,0) as sUpcoming, IF(a.releasedate>CURDATE(),DATE_FORMAT(a.releasedate, ‘%d.%m.%Y’),’’) as sReleasedate, ( SELECT 1 FROM s_articles_live WHERE articleID=a.id AND active =1 AND valid_from <= NOW() AND valid_to > NOW() LIMIT 1 ) as liveshopping FROM s_articles_categories AS aCategories JOIN s_articles_details AS aDetails ON aDetails.articleID=aCategories.articleID AND aDetails.kind=1 JOIN s_articles_attributes AS aAttributes ON aAttributes.articleID = aCategories.articleID AND aAttributes.articledetailsID=aDetails.id JOIN s_articles AS a ON a.id=aCategories.articleID AND a.mode = 0 AND a.active=1 JOIN s_core_tax AS aTax ON aTax.id=a.taxID LEFT JOIN s_articles_supplier AS aSupplier ON aSupplier.id=a.supplierID LEFT JOIN s_articles_prices p ON p.articleDetailsID=aDetails.id AND p.pricegroup=‘EK’ AND p.to=‘beliebig’ LEFT JOIN s_articles_prices p2 ON p2.articledetailsID=aDetails.id AND p2.pricegroup=‘EK’ AND p2.to=‘beliebig’ WHERE aCategories.categoryID=2195 AND ( SELECT articleID FROM s_articles_avoid_customergroups WHERE articleID = a.id AND customergroupID = 1 ) IS NULL ORDER BY a.datum DESC, a.id LIMIT 0,12 Hier ist die Explain-Ergebnis http://www.technikexpert.com/Explain.png Wie man sieht, es ist kein INDEX für s_articles benutzt wird.