Subject Re: [IBO] John Hart's Looping Thing
Author Helen Borrie (TeamIBO)
At 02:52 AM 20-02-02 -0800, you wrote:
>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.

This kind of task should be done on the server, not on the client using this *decidedly* Paradox-ish style of processing, all the overhead of two datasets and shuffling completely unnecessary output back and forth between server and client in ever-snowballing lumps. Have your procedure run a FOR SELECT...INTO loop over the Result table, passing the column-values you want for the POOL table INTO local variables. Inside the loop, test for the existence of the key in POOL using an IF(EXISTS()) predicate and do your INSERT according to the result of that test.

The BuildKey method (whatever it is) makes me shudder - unless this application is ALWAYS going to be for single-user, single-connection use.


regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com