View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004925 | OXID eShop (all versions) | 4.08. Cache | public | 2013-02-12 17:39 | 2013-02-13 09:35 |
Reporter | mark | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.7.3 / 5.0.3 revision 54408 | ||||
Fixed in Version | 4.7.4 / 5.0.4 revision 57063 | ||||
Summary | 0004925: oxutilscount::setCatArticleCount uses ugly sql statement (filesort, temp tables) | ||||
Description | oxutilscount::setCatArticleCount builds a sql query like SELECT count(*) FROM ( SELECT count(*) FROM [...] GROUP BY oxv_oxarticles_4_de.oxid ) AS ox2cat Which does unneccessary operations in database (creating temporary tables, doing filesort). | ||||
Steps To Reproduce | 1) insert echo $sQ in oxutilscount::setCatArticleCount 2) delete aLocalCatCache-File from tmp and open Shop 3) take query and do "EXPLAIN {QUERY}" in Database delete "SELECT count(*) FROM (" and ") AS ox2cat" from start and ending of query, change "SELECT count(*)" to "SELECT count(DISTINCT oxv_oxarticles_4_de.oxid) as cnt FROM" (replace my VIEWNAME.OXID through part that was in GROUP BY before). Now again make EXPLAIN - no temporary tables will be opened. | ||||
Additional Information | Another question regarding this -> how is an update request (invalidating) done in environments with more than one app-server? Can be reproduced in 4.5.1 too | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | 5.3 | ||||
Database Version | any | ||||