Subject RE: [IBO] Re: DataSetProvider, ClientDataSet performance
Author Glenn Stephens
Hi Constantijn,

The application is not multi-tier, but is using the briefcase model to store the information locally. This is to a high availability requirement where if the data (read-only) cannot be found it is loaded from the last fetched data, hence the ClientDataSet using the briefcase model. As a result all the data is required for the backup. I'm all into grabbing only the information I need, but in this case the data I need is everything.

I am finding similar fetching performance issues with IB and FB, so I doubt that this relevant in this context. I'm going to look into alternatives today that allow me to keep the IBObjects support though.

Thanks everyone for your help.

Cheers,
Glenn

-----Original Message-----
From: constantijnw [mailto:cw.s@...]
Sent: Monday, 12 July 2004 8:21 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Re: DataSetProvider, ClientDataSet performance

Indeed, IBO is significantly slower than IBX in this context, roughly
about 5 times on my machine connecting locally to employee.gdb and
querying the employee table.
Connection and prepare times are not included.

Measuring at the level of the client dataset, or at the query/dataset
components does not make much difference.
One could argue that you can't compare a query component and a dataset
component, but I didn't notice any performance difference between both
IBX components.
I also checked IB_Cursor, and it was still 50% slower than IBX.

What sql servers do you use? IB, FB or both? You could get into
trouble using IBX with FB.
From what you wrote I don't know if you're working on a multi-tier app
or that you use the client dataset for its special features and/or
future upscaling.
Since I work on a multi-tier app I design clients very differently. I
was surprised to see how much you can gain by rethinking every byte
you intend to pull over the network carefully. And the outcome is that
  responsiveness is so good that users wouldn't notice any difference
when using another taste of components. Nevertheless, as a designer it
would be great to know you're working with the fastest option
possible. I hope Jason will come up with a component optimized for
response time of selects of relatively small datasets soon.


--- In IBObjects@yahoogroups.com, "Glenn Stephens"
<Glenn.Stephens@a...> wrote:
> Hi Constantijn,
>
> Thanks for answering.
>
> I'm not using the CommandText property. I am using the SQL property in
> the TIBOQuery. What I want to demonstrate is the difference in the speed
> of obtaining data. Paste the dfm code at the bottom of the email to your
> form. Change the Database name and the SQL to a database/table on your
> system for both of the databases. Now set the ClientDataSet on the left
> side (IBO) to true and count how long it takes in seconds. Now do the
> same with the ClientDataSet on the right.
>
> I counted to 21 for IBO objects code on the left and got to 1 for the
> IBX components.
>
> Any ideas here? I don't really want to move a lot of the code to IBX.
>
> Cheers,
> Glenn
>
> ---Paste the code below to your form or datamodule---
>
>
> object IB_Session1: TIB_Session
>   AllowDefaultConnection = True
>   AllowDefaultTransaction = True
>   DefaultConnection = IB_Connection1
>   EditingColor = clYellow
>   InsertingColor = clLime
>   DeletingColor = clRed
>   SearchingColor = clAqua
>   ReadOnlyColor = clSilver
>   SelectedColor = clBlue
>   InvalidColor = clNone
>   PreparedColor = clGrayText
>   BrowsingColor = clWindow
>   StoreActive = False
>   Left = 144
>   Top = 72
> end
> object IB_Connection1: TIB_Connection
>   DefaultTransaction = IB_Transaction1
>   Params.Strings = (
>     'SERVER=myserver'
>     'PATH=e:\data\mydata.ib'
>     'PROTOCOL=TCP/IP'
>     'USER NAME=SYSDBA')
>   Left = 80
>   Top = 152
> end
> object IB_Transaction1: TIB_Transaction
>   IB_Connection = IB_Connection1
>   Isolation = tiConcurrency
>   Left = 208
>   Top = 152
> end
> object IBOQuery1: TIBOQuery
>   Params = <>
>   DatabaseName = 'myserver:e:\data\mydata.ib'
>   IB_Connection = IB_Connection1
>   RecordCountAccurate = True
>   SQL.Strings = (
>     'select * from MYTABLE')
>   FieldOptions = []
>   Left = 144
>   Top = 216
> end
> object DataSetProvider1: TDataSetProvider
>   DataSet = IBOQuery1
>   Left = 144
>   Top = 296
> end
> object ClientDataSet1: TClientDataSet
>   Aggregates = <>
>   Params = <>
>   ProviderName = 'DataSetProvider1'
>   Left = 144
>   Top = 368
> end
> object IBDatabase1: TIBDatabase
>   DatabaseName = 'myserver:e:\data\mydata.ib'
>   Params.Strings = (
>     'user_name=sysdba'
>     'password=masterkey')
>   LoginPrompt = False
>   DefaultTransaction = IBTransaction1
>   IdleTimer = 0
>   SQLDialect = 1
>   TraceFlags = []
>   Left = 392
>   Top = 152
> end
> object IBTransaction1: TIBTransaction
>   Active = False
>   DefaultDatabase = IBDatabase1
>   AutoStopAction = saNone
>   Left = 520
>   Top = 152
> end
> object IBQuery1: TIBQuery
>   Database = IBDatabase1
>   Transaction = IBTransaction1
>   BufferChunks = 1000
>   CachedUpdates = False
>   SQL.Strings = (
>     'select * from MYTABLE')
>   Left = 464
>   Top = 224
> end
> object DataSetProvider2: TDataSetProvider
>   DataSet = IBQuery1
>   Left = 464
>   Top = 296
> end
> object ClientDataSet2: TClientDataSet
>   Aggregates = <>
>   Params = <>
>   ProviderName = 'DataSetProvider2'
>   Left = 464
>   Top = 368
> end



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
             without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !          



Yahoo! Groups Sponsor
ADVERTISEMENT





Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/
 
* To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com
 
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.