Subject | Re: [ib-support] Re: Slow first 'Query' |
---|---|
Author | Paul Beach |
Post date | 2001-08-01T08:47:25Z |
Phil,
corrects me, other than that I would have to go away and check the code.
However, back in classic land, one of the problems we used to see every now
and then - was the following.
If a table/tables that were being used in a query after an initial
connections had a lot of triggers defined, the query initialisation would
take a little bit of time, or a lot of time depending on the number of
triggers. All trigger code for table/tables that were going to be used in a
query were loaded into memory first, before the query executed.
Now - does InterBase load all of the Trigger and SP code into memory on
first connect with SuperServer, so it can be shared and re-used later. If it
does - that's the answer.
Regards
Paul
> > > Thanks. It seams to knock a second or so off the time, but it stilland
> > > takes 12
> > > seconds for the 'first query' to run. There must be something else.
> >
> > Do you make a lot of use of triggers?
>
> Not really, only about 78, all of which are 'generator triggers'.
>
> The db stats are....
>
> Tables = 248
> Views = 76
> Procedures = 1735
> Triggers = 78
>
> ...but the same 'issue' happens with every database I have both smaller
> larger.This is only a thought, so I shall wait and see if somebody jumps in and
corrects me, other than that I would have to go away and check the code.
However, back in classic land, one of the problems we used to see every now
and then - was the following.
If a table/tables that were being used in a query after an initial
connections had a lot of triggers defined, the query initialisation would
take a little bit of time, or a lot of time depending on the number of
triggers. All trigger code for table/tables that were going to be used in a
query were loaded into memory first, before the query executed.
Now - does InterBase load all of the Trigger and SP code into memory on
first connect with SuperServer, so it can be shared and re-used later. If it
does - that's the answer.
Regards
Paul