Subject Re: [firebird-support] UPDATE: Slow Firebird results first time I query, but fast thereafter
Author Aage Johansen
blizzardb2001 wrote:
> UPDATE...
>
> Okay so I ran some more tests. It seems that just about any select
statement from any of the tables is very slow the first time, very
fast the next time.
> I create a dataset called QryTest.
> I set the SQL to "SELECT "ID" FROM "TblBookings"
> Close.
> Open.
> Takes 12 seconds.
> Close.
> Open.
> Takes 1 second.
> Change the SQL to a complex SELECT statement.
> Close.
> Open.
> Takes 12 seconds.
> Close.
> Open
> Takes 1 second.
>
> INSERT STATEMENTS however are very fast.
>
> I am using Zeoslib and Delphi BDS 2006


Maybe ZeosLib uses some time to get metadata info, which it then caches.
Can you do an explicit prepare before you open the query - maybe most
of the time is spent at the prepare. However, this should affect
inserts as well...


--
Aage J.