Subject Re: [IBO] Newbie Performance Question
Author lester@lsces.globalnet.co.uk
> I have been trying the IBObjects components with a database that
> contains roughly 2.5 million records. For some strange reason I have
> found that the performance is slower than with the BDE.
>
> The structure of the query process is such that each form performs
> several queries to the database using a few components, which are
> then reused for other queries.

The problem here is probably that IBO tries to be more inteligent in
caching data, so when you 're-use' queries they are rebuilt from the
bottom up. Client/Server operations require a different approach.

> I have noticed with IBO that there is a slight pause between each
> query, whereas with the BDE there isn't.

> I am also using the BDE compatability components, as opposed to the
> native Interbase components.

IBOTable or IBOQuery?
If you are using table, then things can be a lot slower. Converting
tables to SQL query will help as you can modify the query to improve
performance.

> The problem is that with many queries over a large amount of data,
> the pauses tend to build up, resulting in performance that is
> dramatically slower than with the BDE.
>
> Is this something that is inherent to IBO components? Is there any
> way that I can stop the pauses without significantly restructuring my
> application? Would it be worth converting to the native components?

The problem may well be the structure of your application. The
compatibility components allow the fast switch to IBO, and presumably
the application is working correctly. Some speed-up would be achieved by
switching to native components, but the real speed improvements would
come from eliminating 'reusable' queries and replacing them with more
'accurate' queries that return just the information required.

Rule 1, the client can't read 2.5 million records at once, only return
what he actually needs to see.

Rule 2, if you need a result that uses 2.5 million records get the
server to calculate it and return the answer.

You will not get away without changing the application, but you will be
suprised how quickly small changes to the application create big
results. Don't worry if you have a lot more IBOQuery's, there is still
only one connection. But switch to native as soon as you can, and take
advantage of the grid components additional facilities. ( I still use
RXGrid and it can be a pain, but there has been no time to change those
yet ).

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services