Subject | Re: [IBO] TIBOQuery to TClientDataSet really slow |
---|---|
Author | Helen Borrie |
Post date | 2003-09-16T04:05:12Z |
At 01:12 PM 16/09/2003 +1000, you wrote:
I set up a really basic project in D6, accessing an IB 5.6 server on
another machine in the network. It returns a dataset of ~200 rows in
subsecond time. The app is running on an AMD Duron 1300 with 1 Gb RAM, the
db server is on an AMD Duron 850 with 512 Kb.
Here's the "bare bones" dfm text:
object Form1: TForm1
Left = 192
Top = 107
Width = 696
Height = 480
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object DBGrid1: TDBGrid
Left = 8
Top = 24
Width = 673
Height = 417
DataSource = DataSource1
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object IBODatabase1: TIBODatabase
Params.Strings = (
'PATH=c:\gdb_5_6\ibook\ibook.gdb'
'SERVER=duck'
'PROTOCOL=TCP/IP'
'USER NAME=sysdba')
Left = 24
Top = 8
SavedPassword = '.JuMbLe.01.432B0639073E0E4B49'
end
object IBOQuery1: TIBOQuery
Params = <>
KeyLinks.Strings = (
'COMPONENTID')
RecordCountAccurate = True
RequestLive = True
SQL.Strings = (
'SELECT * FROM COMPONENT')
FieldOptions = []
Left = 64
Top = 8
end
object DataSetProvider1: TDataSetProvider
DataSet = IBOQuery1
Constraints = True
Left = 104
Top = 8
end
object ClientDataSet1: TClientDataSet
Aggregates = <>
Params = <>
ProviderName = 'DataSetProvider1'
Left = 144
Top = 8
end
object DataSource1: TDataSource
DataSet = ClientDataSet1
Left = 184
Top = 8
end
end
Here is the FormCreate code:
procedure TForm1.FormCreate(Sender: TObject);
begin
if not ibodatabase1.Connected then
ibodatabase1.connect;
if not iboquery1.Active then
iboquery1.Open;
if not clientdataset1.Active then
clientdataset1.Open;
end;
If you want to try it out with this database, it's available in the bunch
of files in the zipfile
http://source.ibobjects.com/contributed/gsg_proj_src.zip
(Though it would easier and better for you to replicate this demo using
your own database).
regards,
Helen
>Using IBO4 on Delphi 7 with Interbase 5.6, I've got a TIBOQueryTim,
>connected to a TClientDataSet via a TDataSetProvider. For some reason
>this takes over a minute (on a P4 2.4Ghz, 1GB RAM) to fill the
>TClientDataSet, even if there is only 1 row in the TIBOQuery.
>
>Using IBX in a similar way is instantaneous. However, I have to use IBO
>for this project.
>
>Has anyone seen this problem and is there anything I can do about it to
>speed things up?
I set up a really basic project in D6, accessing an IB 5.6 server on
another machine in the network. It returns a dataset of ~200 rows in
subsecond time. The app is running on an AMD Duron 1300 with 1 Gb RAM, the
db server is on an AMD Duron 850 with 512 Kb.
Here's the "bare bones" dfm text:
object Form1: TForm1
Left = 192
Top = 107
Width = 696
Height = 480
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object DBGrid1: TDBGrid
Left = 8
Top = 24
Width = 673
Height = 417
DataSource = DataSource1
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object IBODatabase1: TIBODatabase
Params.Strings = (
'PATH=c:\gdb_5_6\ibook\ibook.gdb'
'SERVER=duck'
'PROTOCOL=TCP/IP'
'USER NAME=sysdba')
Left = 24
Top = 8
SavedPassword = '.JuMbLe.01.432B0639073E0E4B49'
end
object IBOQuery1: TIBOQuery
Params = <>
KeyLinks.Strings = (
'COMPONENTID')
RecordCountAccurate = True
RequestLive = True
SQL.Strings = (
'SELECT * FROM COMPONENT')
FieldOptions = []
Left = 64
Top = 8
end
object DataSetProvider1: TDataSetProvider
DataSet = IBOQuery1
Constraints = True
Left = 104
Top = 8
end
object ClientDataSet1: TClientDataSet
Aggregates = <>
Params = <>
ProviderName = 'DataSetProvider1'
Left = 144
Top = 8
end
object DataSource1: TDataSource
DataSet = ClientDataSet1
Left = 184
Top = 8
end
end
Here is the FormCreate code:
procedure TForm1.FormCreate(Sender: TObject);
begin
if not ibodatabase1.Connected then
ibodatabase1.connect;
if not iboquery1.Active then
iboquery1.Open;
if not clientdataset1.Active then
clientdataset1.Open;
end;
If you want to try it out with this database, it's available in the bunch
of files in the zipfile
http://source.ibobjects.com/contributed/gsg_proj_src.zip
(Though it would easier and better for you to replicate this demo using
your own database).
regards,
Helen