Subject Re: [IBO] How to increase performance (a lot of Queries used)
Author Geoff Worboys
> All together takes 10 seconds. The IB_Connection was already open.
> I would like to improve this retard...
<...>
> Can someone give me a guideline, some advices, about how to increase
> performance on this ? (only on IBO side, not hardware, not LAN)
> I guess TIB_Query->AutoFetchFirst, TIB_Query->GetServerDefaults,
could be
> important... or not?
> Which properties are decisive, what it suits to avoid, etc.

Avoid GetServerDefaults - last time I looked it was not implemented
efficiently. If it is still operating the same way, you will only see
the problem when going into insert mode. Use the DefaultValues
property on the dataset instead.

Review each of your queries - open up the query editor and try to
prepare it. If it takes any more than a second or so, take a look at
what you have and see how you can simplify. Check the plans that
appear at the bottom of the SQL page to be sure that IB is using
appropriate indexes. Perhaps you are doing a join that is not
efficient, or perhaps the joined table can be separated out into a
master-detail arrangement.

Start SQLMonitor before openning the form. Look at how much time
things are taking and tackle each problem as you find it.

Dont prepare or open anything that you dont need. On my more complex
forms I usually have a TPageControl. I setup so that only those
queries needed on the first page are opened when the form is openned.
As a new page is selected any queries required on that page are
prepared.

Read up on the SchemaCache capabilities. Prepares sometimes take a
fair amount of time because of the amount of metadata retrieved. This
can be avoided by using the SchemaCacheDir property on the
IB_Connection.

There are probably other issues, but this is where I usually start.


HTH

Geoff Worboys
Telesis Computing