Subject Re: [firebird-support] Sum results of a subquery?
Author Ann W. Harrison
Kjell Rilbe wrote:


>
> 1. doing a semi-compiled loop in SP language or SQL (using a view as per
> Alan's suggestion) compared to a truly compiled loop in the application, or
>

Don't underestimate the efficiency of a stored procedure. On first
reference, the stored procedure is converted to a set of execution
steps, optimized for the current size and structure of the tables and
indexes involved. The SQL is long gone.

Regards,


Ann