Subject | RE: [IBO] Re: DataSetProvider, ClientDataSet performance |
---|---|
Author | Glenn Stephens |
Post date | 2004-07-12T00:12:52Z |
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
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