[YC-717] Optimise image import Created: 26/May/16  Updated: 12/Sep/17  Resolved: 26/May/16

Status: Closed
Project: YesCart
Component/s: manager client, manager server
Affects Version/s: 3.1.0
Fix Version/s: 3.3.0

Type: Improvement Priority: Major
Reporter: Denis Pavlov Assignee: Denis Pavlov
Resolution: Fixed Votes: 0
Labels: impex, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Need to optimise the speed of the image import. It seems like if the image file names do not use standard pattern the query attempt to lookup the image attribute value by VAL which leads to slow queries. We need to optimise this query so that additional criteria on the index field CODE is used as well.

Quick comparison on 0.5m attributes in query times:

mysql> select productent1_.CODE as col_0_0_ from TPRODUCTATTRVALUE attrvaluee0_, TPRODUCT productent1_ where attrvaluee0_.PRODUCT_ID=productent1_.PRODUCT_ID and attrvaluee0_.VAL='341260.jpg';
Empty set (5,65 sec)

mysql> select productent1_.CODE as col_0_0_ from TPRODUCTATTRVALUE attrvaluee0_, TPRODUCT productent1_ where attrvaluee0_.PRODUCT_ID=productent1_.PRODUCT_ID and attrvaluee0_.CODE like 'IMAGE%' and attrvaluee0_.VAL='341260.jpg';
Empty set (0,19 sec)



 Comments   
Comment by Denis Pavlov [ 26/May/16 ]

https://github.com/inspire-software/yes-cart/commit/06d62cebfdb7c16402c624ba25b6ede45689b8a9

Generated at Sat Feb 22 04:19:39 UTC 2020 using JIRA 7.8.0#78000-sha1:4568b9d484113d74dfb6f152fb925b5fa1be2ef7.