Inefficient procedure ecfVersion_DeleteByObjectIds

Found in

EPiServer.Commerce 11.0.0

Fixed in

EPiServer.Commerce 11.2.6

Created

Sep 26 2017

Updated

Oct 06 2017

Area

Core

State

Closed, Fixed and tested


Description

The procedure ecfVersion_DeleteByObjectIds may perform poorly in some scenarios.

It

  1. Loads affected classes (MetaObjectId, MetaClassId and WorkId).
  2. Inserts them into a temp table.
  3. Uses a cursor to iterate through that.
  4. Passes the rows one by one to mdpsp_sys_DeleteMetaKeyObjects, which loads the MetaKey and deletes it.

This is hugely inefficient. It should be handled by set processing.