Subject Re: [firebird-support] Speed difference question
Author Dmitry Yemanov
Dimitry Sibiryakov wrote:

>> Does anyone have an opinion on the likely speed difference between:
>> 1. Calling a stored procedure repeatedly versus
>> 2. Sending an sql statement to be prepared and then executing that repeatedly.
>
> There is no difference between these cases.

I'd say it depends on the procedure complexity. In the former case, its
body is parsed/compiled/optimized just once and all the iterations just
parse/optimize a trivial EXECUTE PROCEDURE statement. In the latter one,
the whole SQL statement is being re-prepared every time. But anyway,
it's unlikely to see much difference in the real life.


Dmitry