2009 Apr 30 10:18 AM
Dear All,
Which one give better performance, to collect data
select
collect
endselect
loop
collect
endloop
Thanks
Moderator message - Welcome to SCN.
Moderator message - But please ask a specific question - post locked
Edited by: Rob Burbank on Apr 30, 2009 8:56 AM
Dear All,
Which one give better performance, to collect data
select
collect
endselect
loop
collect
endloop
Thanks
Moderator message - Welcome to SCN.
Moderator message - But please ask a specific question - post locked
Edited by: Rob Burbank on Apr 30, 2009 8:56 AM
2009 Apr 30 10:21 AM
hi,
in this case you are talking about DATABASE TABLES (SELECT) and INTERNAL TABLES (LOOP).
hence you cant compare both.
ags.
2009 Apr 30 10:22 AM
Hi,
It depend in your requirement and volume of data.
1 time select will give better performnace.
What is your requirement?
2009 Apr 30 10:24 AM
yes, i have huge 50,000 data records, please suggest to use which one
also, i am concern about execution time.
Edited by: Imraansy11 on Apr 30, 2009 11:25 AM
2009 Apr 30 10:26 AM
hi,
ur data is in internal table????
then use Loop
Endloop.
ags.
2009 Apr 30 10:27 AM
50.000 is quite small, 50 million is huge. Code both ways and compare runtimes, then pick the better one.
Thomas
2009 Apr 30 10:28 AM
Hi,
50,000 records will not be a problem.if you want to reduce the execution size then you can use open cursor approach based on package size to fecth the data. it will reduce the execution time.
in this select the data based on package size and then go for further processing.
let me know if you need further help.
2009 Apr 30 12:18 PM
Why not TRY it and see
borrow a stopwatch if you have to.
2009 Apr 30 1:00 PM
this is a nonsense question.
You can not compare SELECTs and LOOPs see above, it depends are you data are coming from.
And please read the documentation about the COLLECT, use it with hashed tables and you are on the safe side, otherwise you must never do anything else with the table as long you execute the COLLECT.
Otherwise less than 50.000 records will kill you.
Siegfried
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |