Rajat Sharma
Member
Hello everyone, hope you are doing well.
I was in a discussion of temp-table loading and deleting problem with respect to memory. I am explaining the discussed problem and the example which I have tried regarding the same:
Problem:
One temp-table (for ex: abc) is having around 60000 records and one external procedure (containing temp-table definitions) is called inside FOR EACH of the temp-table (abc). So for 60000 iteration of temp-table, external procedure is called 60000 times. My question is, does progress needs to load/delete temp-table into/from memory each time .P (external procedure with temp table definition) is called. Apparently if this happens then isn't it a big performance loss due to temp-table (please suggest).
I tried one similar example for checking the performance difference but didn't find any huge difference regarding the same.
I didn't get much difference when I run this program (mentioned above) with following scenario’s:
1. I didn’t define anything in calc.p program.
2. I have defined temp-tables in calc.p.
3. Along with defining temp-table, I have created temp-table in calc.p program with some dummy data.
Please give your inputs on this.
Thanks & Regards!
Rajat.
I was in a discussion of temp-table loading and deleting problem with respect to memory. I am explaining the discussed problem and the example which I have tried regarding the same:
Problem:
One temp-table (for ex: abc) is having around 60000 records and one external procedure (containing temp-table definitions) is called inside FOR EACH of the temp-table (abc). So for 60000 iteration of temp-table, external procedure is called 60000 times. My question is, does progress needs to load/delete temp-table into/from memory each time .P (external procedure with temp table definition) is called. Apparently if this happens then isn't it a big performance loss due to temp-table (please suggest).
I tried one similar example for checking the performance difference but didn't find any huge difference regarding the same.
Code:
DEF VAR i AS INT NO-UNDO.
DEF VAR t1 AS INT NO-UNDO.
ETIME(YES).
DEF TEMP-TABLE t-prac
FIELD a AS INT
FIELD b AS INT
FIELD c AS INT
FIELD d AS CHAR
FIELD f AS CHAR.
DO i = 1 TO 60000:
CREATE t-prac.
ASSIGN
/*assigning dummy values here*/
END.
FOR EACH t-prac:
RUN calc.P. /*program containing temp-table definitions*/
END.
t1 = ETIME.
MESSAGE t1
VIEW-AS ALERT-BOX.
I didn't get much difference when I run this program (mentioned above) with following scenario’s:
1. I didn’t define anything in calc.p program.
2. I have defined temp-tables in calc.p.
3. Along with defining temp-table, I have created temp-table in calc.p program with some dummy data.
Please give your inputs on this.
Thanks & Regards!
Rajat.