Table handle and indexes

tsp

New Member
Hi

I have a temp table which is being passed through and the procedure is accepting it as a table handle.

But when looping through the table it is taking a very long time. I have indexes on the temp table that is being passed in but not sure what else i can try to check if indexes are being passed through

any ideas would be appreciated

cheers
 
Why do you think looping through the table is taking a very long time. Does it take less time to loop through the temp-table within the procedure that creates the temp-table. How many records are there in the temp-table. Did you debug it using etime or by displaying messages to track it down to the loop.
 
hi

Its taking much longer than looping through the actual temp table where it creates it.

there is about 3000 records

i outputted the results to a file
 
You don't say anything 'bout your Progress/OpenEdge version ...

Generally speaking - whenever you pass a temp-table from one procedure to another the receiving procedure receives the full schema information. You cannot pick and choose which part of the schema information is transmitted, therefore you cannot specify a specific index to be transmitted and another to be skipped ...

Whenever you are passing a temp-table from one procedure to another you need to take into account that you'll probably create a copy of the temp-table in the receiving procedure. If the receiving procedure is another session (for example you are passing the temp-table from a procedure which runs on the client to one which runs on the AppServer) then there's nothing you can do about it. But, if the sending and the receiving procedure are in the same session you might consider to change your approach:

1. Either pass only the handle to the temp-table or it's associated buffer object
2. or pass BY-REFERENCE

HTH, RealHeavyDude.
 
Back
Top