Dynamic SQL and Performance of Stored Procedure

Database
Enthusiast

Dynamic SQL and Performance of Stored Procedure

Hi All,

Recently someone told me that using Dynamic SQL in TD procedure is not a good practice for performance reasons. Is that true? Does it mean that for every procedure call procedure needs to re-compile?

Is there any way to avoid dynamic sql completely? Parameterizing query is something which I can not avoid.

Thanks