I was trying to mark the open customer transactions in 'Settle open transaction', and I found it took about 3 minutes to mark after I ticked the checkbox.
After tracing the code, I found when executing the code, there's a query slows down the process. But the weird thing is that the same T-SQL which I got from trace parser runs less than 1 second to return the same result set as the query returns. So I think the index and statics should be good on the tables. What could be the cause of this performance issue?
*This post is locked for comments