In case anyone is interested, message from Epicor development:
With the assistance of the review board, we found the cause of this issue.
ERPS-104238 was generated to address this problem and it will be available alongside version 10.2.400
There is a Bug where Copy Order calls CheckLetterOfCredit method even when order has no letter of credit, and this is causing the performance issue.
PROBLEM DESCRIPTION The Copy Sales Order action is calling the CheckLetterOfCredit method even when the order being copied has no letter of credit. This is causing a significant performance problem on the Customer DB. EXPECTED 1. The CheckLetterOfCredit method should only be called when the order being copied is linked to a Letter of Credit 2. Inside public method, make first validation if LOC exist, before invoking time consuming queries 3. Nice to have: Review if performance of related queries can be improved Additional Test: - Review that the call is not displayed in the tracing log. - Regression testing related to this functionality SCR 208864.