Sunday, January 25, 2015

Help needed in Performance Tuning


I understand your concern. Isprocessed is a not null column.



In that case, you don't need the coalesce.


Also, if this is a stored procedure, you don't need to drop the temp tables. If this is a loose script, I would drop the temp tables at the end.


There are a still a few suggestions from my first post, that you don't seem to have considered. And again, I stress the importance of indexes. Playing with different indexes may be more important for speed than the code itself.





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

No comments:

Post a Comment