Details
-
Improvement
-
Resolution: Unresolved
-
High
-
4.5.0
-
None
Description
In environments that have a large database, the operation of deleting a product in the admin interface can take a long time - several hours - due to the fact that the purge method that is called verifies if the deleted object is in the eZ Basket AND in the wishlist.
The query responsible for this operation is llocated on ezpublish_legacy/kernel/classes/ezcontentobject.php:
$sql = 'SELECT DISTINCT ezproductcollection_item.productcollection_id FROM ezbasket, ezwishlist, ezproductcollection_item WHERE ( ezproductcollection_item.productcollection_id=ezbasket.productcollection_id OR ezproductcollection_item.productcollection_id=ezwishlist.productcollection_id ) AND ezproductcollection_item.contentobject_id=' . $delID;
Please optimize this query.