Subject RE: [firebird-support] slow query at first execution
Author Alan McDonald
> In data Wed, 28 Apr 2004 11:19:29 +0200, hai scritto:
>
> > I believe that when the query is executed for the first time, server
> > retrieves records from disk
> > Subsequent querys are finding the records in cache
>
> not sure about that.
> if my guess that the query is truly that one (i'm going to test it more
> deeply), what i do is to retrieve the PKID of a row that has been inserted
> some seconds earlier. so, i suppose, it's already in cache (this is db low
> level voodoo i don't know).

What you peraps should do is get the PJ first (direct from the generator)-
before you do the insert, then you don't have to retrieve it from the table
later - it save a lot of time and resource load.
Alan