Subject Slow first 'Query'
Author Phil Shrimpton

Something that I have noticed in all versions of IB/FB on all platforms, with
all access methods and 'tools' I have tried, is that the first 'query' after
connecting to the database takes forever and after that all
'queries' run like s**t off a shoval.

I am pretty sure it is to do with IB/.FB doing something with the cache, and
the bigger the database (in terms of SP's and Tables etc.) the longer the
'first query' takes. Just to be clear, this is not the first run of each
query that takes the time, it is just the first run of the first query.

This has not been a problem up to now, but in a current app, the first
'query' takes 15-20 seconds to 'run', and after that all 'queries' take under
half a second. (I have tested this on seveal platforms and several versions
of IB.FB)

Does anyone know what IB/FB is doing during this time (there is no network
traffic as such)?

Can anything be done about it? (I am currently running a 'query' just after
connection and discarding the result set, and 'pretending' it takes 15
seconds to connect to the database)


Linux 2.4.4-4GB
1:55am up 15 days, 23:38, 1 user, load average: 2.77, 1.52, 0.93