Subject Re: [ib-support] Memory Useage with Select Procedure
Author Geoff Worboys
> Try selecting the natural values from the source table, and
> pass each row to a single stored procedure on the target.
> The target SP can translate any values, and write the row
> into the target database.

Yes, I guess that will solve the immediate problem.

Do you have any idea whether the memory issue that I am seeing is
normal/expected?

Perhaps it is just a natural effect of the way IB implements stored
procedures in these circumstances. It does seem that I may have to
review some of the stored procedures I am using in other applications,
avoiding this situation wherever the result set may get large.

I tend to quite a bit of this style of processing, not always for data
transfer where your solution will help, but also just in batch
processing of large tables. eg.

FOR SELECT DATA FROM BIG_TABLE
INTO :TMP
DO BEGIN
<do something, which may include
calling other stored procedures>
END


Looks like I have lots more testing to do. I may have to stop being
lazy and writing stuff in stored procedures, and revert to client
based processing (even if I have the client app sit on the server to
reduce network overheads).


Geoff Worboys
Telesis Computing