Subject | Re: [firebird-support] FB sql compilation: buffered or not? |
---|---|
Author | Martijn Tonies |
Post date | 2004-01-12T10:26:28Z |
Hi,
but are "buffered". But only on the connection level, not across
different connections.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I was looking articles on FB architecture and got an impression that anySQL
> statement submited to FB is compiled every time, i.e. it includes parsing,or
> 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
> not, i.e. will the examples bellow have performance difference (I'vewritten
> them in some kind of pseudo code which I hope is understandable):(B) will be much faster. Prepared statement aren't re-evaluated,
>
> 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;
but are "buffered". But only on the connection level, not across
different connections.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com