Subject | Re: [firebird-support] Re: When do I commit |
---|---|
Author | Grant Brown |
Post date | 2005-06-07T03:52:33Z |
Hi Adam,
querys as per you suggestion using the FieldByName etc and we then
changed them as per below and the difference in performance was just
amazing - boy did it speed things up.
var
T: Integer;
FieldArray: array[0..1] of TField;
begin
try
LoadQuery.Params[0].AsInteger := MyIDNumber;
LoadQuery.open();
FieldArray[0] := LoadQuery.FieldByName('XXXXaaaa');
FieldArray[1] := LoadQuery.FieldByName('XXXXaaaa');
while not LoadQuery.eof do
begin
MyItem_1.Text := FieldArray[0].asString;
MyItem_2.Text := FieldArray[0].asString;
LoadQuery.Next();
end;
finally
LoadQuery.Close();
end;
--
Regards,
Grant Brown
Product Development Manager
Phone : 02 4229 1185
Mobile : 0412 926 995
Email : grant@...
Web : www.sitedoc.com.au
SiteDoc - Easy to Use - Powerful Results
>>I doubt it is noticeable. They tend to be very small lists and areNot so sure about this, on our core product SiteDoc we first had all
>>kept in memory, so each search is at worst n complexity.
querys as per you suggestion using the FieldByName etc and we then
changed them as per below and the difference in performance was just
amazing - boy did it speed things up.
var
T: Integer;
FieldArray: array[0..1] of TField;
begin
try
LoadQuery.Params[0].AsInteger := MyIDNumber;
LoadQuery.open();
FieldArray[0] := LoadQuery.FieldByName('XXXXaaaa');
FieldArray[1] := LoadQuery.FieldByName('XXXXaaaa');
while not LoadQuery.eof do
begin
MyItem_1.Text := FieldArray[0].asString;
MyItem_2.Text := FieldArray[0].asString;
LoadQuery.Next();
end;
finally
LoadQuery.Close();
end;
--
Regards,
Grant Brown
Product Development Manager
Phone : 02 4229 1185
Mobile : 0412 926 995
Email : grant@...
Web : www.sitedoc.com.au
SiteDoc - Easy to Use - Powerful Results