June 5, 2008 at 6:18 am
For Small query as u written in your exapmple, it wont hamper as much but in large query yes. because number of transaction are increesing.
you can check it by showing the client statistics and execution plan in query analyzer.
-Satya N.Tailor
June 5, 2008 at 7:07 am
Basically its going to be a quite a bit of performance hit as in your stored procedure where you used dynamic sql, the plans are not used its a better option to use sp_executesql if you opt to go for dynamic sql for some reasons of desparation to accomplish some task which you believe cannot be achieved without dynamic sql.
It is always wise to avoid dynamic sql not only from performance perspective but as from security perspective. There are several articles on dynamic sql and its cons for you to really get in depth view of what I meant in the above statements.
Prasad Bhogadi
www.inforaise.com
June 5, 2008 at 7:28 am
Thanks for your valuable reply and time..
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply