Application Development and Automation 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: 
Read only

Better performance for collecting data

Former Member
0 Likes
1,283

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

8 REPLIES 8
Read only

agnihotro_sinha2
Active Contributor
0 Likes
1,206

hi,

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

hence you cant compare both.

ags.

Read only

Former Member
0 Likes
1,206

Hi,

It depend in your requirement and volume of data.

1 time select will give better performnace.

What is your requirement?

Read only

0 Likes
1,206

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

Read only

0 Likes
1,206

hi,

ur data is in internal table????

then use Loop

Endloop.

ags.

Read only

0 Likes
1,206

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

Thomas

Read only

0 Likes
1,206

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.

Read only

matt
Active Contributor
0 Likes
1,206

Why not TRY it and see

borrow a stopwatch if you have to.

Read only

Former Member
0 Likes
1,206

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