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

for all entries

Former Member
0 Likes
455

Hi,

Give answer for this question

How can we optimize the logic in nested loops.Is there any standard way?

Hi,

Give answer for this question

How can we optimize the logic in nested loops.Is there any standard way?

3 REPLIES 3
Read only

Former Member
0 Likes
438

a couple of suggestions:

1. Use inner join - this is normally more efficient.

2. select into an internal table where possible

3. define a database view in SE11

Read only

franois_henrotte
Active Contributor
0 Likes
438

you should avoid nested loops

- either you SELECT with JOIN statement

- either you create a view in Data Dictionary and use it for selection

FOR ALL ENTRIES is possible but if the number of records is huge you will get performance problems

Read only

rodrigo_paisante3
Active Contributor
0 Likes
438

Hi,

standard way: Keep distance of NESTED LOOPS

other ways: parallel cursor, indexed loop

how to find: search in the forum for "nested loop"

[You will find this blog|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3119] [original link is broken] [original link is broken] [original link is broken];

[and this one|/people/siegfried.boes/blog/2007/09/12/runtimes-of-reads-and-loops-on-internal-tables]

Thanks!