Thursday, May 7, 2015

Table Variables very slow performance

We will not be able to help you with the explanation that you provided. We need more details like DDL + DML + your function code + Execution plan and index details etc.

However, here are few points that you can check out:

1. Try to avoid CURSOR based approach and move to SET based approach wherever possible.

2. Try to avoid SCALAR if that causes a performance issues. Use Inline TVF instead.

3. Try to examine the execution plan and see where your execution is taking more time.

4. Try to optimize your query to use indexes and make sure the appropriate insdexes are available.


Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
 [Blog]

No comments:

Post a Comment