Subject FB sql compilation: buffered or not?
Author lnd@hnit.is
I was looking articles on FB architecture and got an impression that any SQL
statement submited to FB is compiled every time, i.e. it includes parsing,
building an execution plan, etc every time even if the same SQL statement
(possibly only with different bind variables values) is issued again and
again.

I.e. no buffer of compiled SQL statements is maintained?
Does this mean that FB is actually indiferent if bind variables are used or
not, i.e. will the examples bellow have performance difference (I've written
them in some kind of pseudo code which I hope is understandable):

A)

execute "select * from EMPLOYEE where name='John' ";

execute "select * from EMPLOYEE where name='Marry' ";

Versus:
B)

statement := prepare " select * from EMPLOYEE where name=:b1 ";

statement.bind ( b1, 'John' );
execute statement;

statement.bind ( b1, 'Marry' );
execute statement;







[Non-text portions of this message have been removed]