Subject Re: [firebird-support] Value from parmeter-dependant colum in where clause
Author Daniel Rail

Just to add to Martijn's message.

At April 25, 2005, 09:22, Tim Gahnström wrote:

> In general, is the use of code in stored procedures expensive in
> terms of speed?


> I think the question really is, is it advisable to
> put as much logic as possible into large select statements or is the
> beauty of smaller select cases combined with code to
> be preferred?

Well written, it can be. The only way to really find out would be to
compare the difference yourself. Also, do remember that stored
procedures are already compiled, compared to having to prepare a
complex SELECT statement. Most of my experience between complex
SELECTs(containing a few sub-selects) and having a corresponding
stored procedure(having the complex query separated into smaller
queries), the stored procedure was faster.

Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (
ACCRA Med Software Inc. (