View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003918 | OXID eShop (all versions) | 4.05. Performance | public | 2012-04-25 09:14 | 2012-12-10 13:29 |
Reporter | b.hasis | Assigned To | |||
Priority | immediate | Severity | block | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.5.10 revision 44222 | ||||
Fixed in Version | 4.6.1 revision 45706 | ||||
Summary | 0003918: new query in oxattributelist::loadAttributes() isnt performant | ||||
Description | The Query to select the Attributes of an parentarticle is not performant. If you call oxattributelist::loadAttributes() by an Variant the generated query are running for a very long time(in a small shop). In a bigger one (Over 20000 articel) it crashed. | ||||
Steps To Reproduce | Create an Articel and also a variants. Open this in Frontend and analyse the query wich is generated in oxattributelist::loadAttributes(). | ||||
Additional Information | tested with mySql: 5.1.30 and 5.1.58-log | ||||
Tags | Performance | ||||
Attached Files | |||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | 5.2.9 | ||||
Database Version | any | ||||
|
changed complicated query to 2 more simple (old way solution) |
|
attached fix in files oxattributelist.php and oxlist.php. in oxlist.php: added setArray() method, in oxattributelist.php added _mergeAttributes() methods and changed loadAttributes() method. |
|
Reminder sent to: b.hasis Hi, can you provide any logs data or error message or something else that can help as to debug more this case? |
|
reopen |
|
Hi, i dont got any logs. Just a heidiSql Profiling of the query. (oxidbug.jpg) |
|
Just add some DB-Files( OxidBug3918.zip) to Reproduce the query shown in my pic. Here the Query thats generated in oxattributelist.php SELECT `Attributes`.`oxid`, `Attributes`.`oxtitle`, IFNULL( `ArticleAtrr`.`oxvalue`, `ParentAtrr`.`oxvalue` ) AS `oxvalue` FROM oxv_oxattribute_1_de AS `Attributes` LEFT JOIN oxv_oxobject2attribute_de AS `ArticleAtrr` ON `Attributes`.`oxid` = `ArticleAtrr`.`oxattrid` LEFT JOIN oxv_oxobject2attribute_de AS `ParentAtrr` ON `Attributes`.`oxId` = `ParentAtrr`.`oxattrid` WHERE 1 AND `ArticleAtrr`.`oxobjectid` = '0f78aa3d7ddf8d3b12fc9ad8016bd282' AND `ArticleAtrr`.`oxvalue` != '' OR `ParentAtrr`.`oxobjectid` = 'b56369b1fc9d7b97f9c5fc343b349ece' AND `ParentAtrr`.`oxvalue` != '' ORDER BY `ArticleAtrr`.`oxpos`, `ParentAtrr`.`oxpos`, `Attributes`.`oxpos` |
|
The issue is fixed in eShop 4.5.11 version, as described in the second comment: "attached fix in files oxattributelist.php and oxlist.php. in oxlist.php: added setArray() method, in oxattributelist.php added _mergeAttributes() methods and changed loadAttributes() method." |