Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any disadvantage to using PRINT in my stored procs?

I can't believe after all these years I am asking this question, but...

Is there any disadvantage to using PRINT in my stored procs? I've bee using it for debugging, but should I remove them after I am done? I'd rather not if I don't have to.

like image 443
gangelo Avatar asked Feb 13 '12 13:02

gangelo


1 Answers

print is function call that i use only for debugging stored procedure ....it affect the performance but its ver very minimal cost as its function call..if possbile remove it or comment it in you code..

Note : PRINTs in loops that are executed many thousands of times, however, may well cause performance issues.

Also check alreay ask question : Print Statement in SQL procedure should affect Performance?

like image 186
Pranay Rana Avatar answered Nov 15 '22 08:11

Pranay Rana