Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Better performance for collecting data

Former Member
0 Kudos

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

8 REPLIES 8

agnihotro_sinha2
Active Contributor
0 Kudos

hi,

in this case you are talking about DATABASE TABLES (SELECT) and INTERNAL TABLES (LOOP).

hence you cant compare both.

ags.

Former Member
0 Kudos

Hi,

It depend in your requirement and volume of data.

1 time select will give better performnace.

What is your requirement?

0 Kudos

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

0 Kudos

hi,

ur data is in internal table????

then use Loop

Endloop.

ags.

0 Kudos

50.000 is quite small, 50 million is huge. Code both ways and compare runtimes, then pick the better one.

Thomas

0 Kudos

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.

matt
Active Contributor
0 Kudos

Why not TRY it and see

borrow a stopwatch if you have to.

former_member194613
Active Contributor
0 Kudos

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