Sunday, November 17, 2013

Query performance improvement techniques

1) SET NOCOUNT ON

set nocount will increase performance

2) use less transaction as less as possible

3) Index seek will perform better than index scan.

4) key look up will degraded performance. It will happen because of non clustered index is not able to identify the specified page rows and trying to identify the pages using clustered key will scan two times.

5) use pivot for better readability

6) use variables in start of the procedure. so that optimizer can create suffixation memory.

7) instead of updating the huge no of rows try to reduce to the batches






No comments: