Subject Re: [IBO] Digest Number 874
Author John Hart
Hi,

I have a problem creating one table from another. To
start it processes approx 300 rows per second but by
the time it has processed 20,000 rows it takes 10
seconds per 100 rows. Below is the segment of code I
used.

if qResult.FindFirst then
repeat
sKey := BuildKey; //Build the Key
if qPool.Locate('KEYSTRING',sKey,[]) then qPool.Edit
else begin
qPool.Insert; // If not there create a new record
qPool['KEYSTRING'] := sKey;
for iLoop := 2 to qPool.FieldCount - 1 do
qPool.Fields[iLoop].Value := 0;
end;
for iLoop := 2 to qPool.FieldCount - 1 do
qPool.Fields[iLoop].Value :=
qPool.Fields[iLoop].Value +
qResult.FieldByName(qPool.Fields
[iLoop].Fieldname).Value;
qPool.Post;
until not qResult.FindNext;

If anyone has an idea where I should look to improve
the performance I would be grateful.

John Hart
Macquarie Training Centre Pty Ltd.


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com