Subject Re: [IBO] TIBODatabse vs TIBOConnection
Author Helen Borrie
At 10:38 PM 20/02/2004 +0000, you wrote:
>I am trying to modify my paridigm from the old BDE TDatabase concept
>to a TIBOConnection. Currently I have been using TIBODatabase and
>have just recently been testing using the TIBOConnection and
>TIBOTransaction.

You mean TIB_Connection, right?


>Is the TIBOConnection/TIBOTransaction methods faster than the
>TIBODatabase? The reason I am wondering is because it seems to
>bring back a simple count query faster than a TIBODatabase.
>
>Does this seem reasonable to assume?

It shouldn't be any different - both are TIB_Connection + TIB_Transaction
under the hood. Once you have a connection, it's the same pie with a
different flavour crust. TIBODatabase has some extra stuff inherited from
TDatabase but it shouldn't make any difference if you are not using the
TDatabase stuff.


>If so why is it faster? Will I see this same type of performance
>gain on all types of queries?

I kinda wonder whether you have some BDE stuff in there that's slowing
things down. Check your uses clauses and make sure dbTables isn't there.

For an answer on the speed of queries issue - the speed limitations of
TIBO* from the TDataset heritage are more to do with the type of component
you use for the various types of query. You'll notice huge gains if you
use TIB_Cursor and/or TIB_DSQL for queries that don't need a datasource
(Execute statements, and, with TIB_Cursor, pulling across small, static
sets that your app puts into a non-data-aware container).

For scrolling datasets, there shouldn't be a significant difference in
performance between TIBOQuery and TIB_Query. The trick once you get into
IBO is to find the places where you are using a scrolling dataset
unnecessarily. Once you get your head around that, you'll probably be
bending over backwards to get rid of the TDataset-compatible components in
favour of native TIB_ to take advantage of the fast-searching and
data-driven interface capabilities. (or not...some people love their
third-party data-aware controls so much that they stick with "pretty" and
to heck with "performance"! :-)) )

Helen