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

abap dictionary

Former Member
0 Likes
1,293

what is difference b/w inner joints and for all enteries?

13 REPLIES 13
Read only

bpawanchand
Active Contributor
0 Likes
1,276

Hi

Regards

Pavan

Read only

GauthamV
Active Contributor
0 Likes
1,276

hi,

first of all it is join not joints.

plz search u have lot of posts on this question.

Read only

Former Member
0 Likes
1,276

Hi!

Don't ask interview questions here. Read the rules of engagement...

Search in sdn or google you'll get several answers

Read only

Former Member
Read only

Former Member
0 Likes
1,276

Hi satish,

Joins:

A join is a query that combines rows from two or more tables, views, or materialized views. Oracle Database performs a join whenever multiple tables appear in the FROM clause of the query. The select list of the query can select any columns from any of these tables. If any two of these tables have a column name in common, then you must qualify all references to these columns throughout the query with table names to avoid ambiguity.

Forallentries:

... [FOR ALL ENTRIES IN <itab>] WHERE <cond>

The condition <cond> may contain one or more comparisons, tests for belonging to intervals, value list checks, subqueries, selection table queries or null value checks, all linked with AND, OR, and NOT. If you use the FOR ALL ENTRIES addition, the condition <cond> is checked for each line of the internal table <itab> as long as <cond> contains a field of the internal table as an operand. For each line of the internal table, the system selects the lines from the database table that satisfy the condition. The result set is the union of the individual selections resulting from each line.

Regards,

Sravanthi

Read only

Former Member
Read only

Former Member
0 Likes
1,276

Hi Satish,

Check these following links...

Inner Join:

http://help.sap.com/search/search_overview.jsp

For All Entries

http://it.toolbox.com/blogs/sap-on-db2/for-all-entries-vs-db2-join-8912

Regards,

Sai

Read only

Former Member
0 Likes
1,276

Hi

http://sapfans.com/forums/viewtopic.php?p=878030 check out here

Reward if useful

regards

Divya

Read only

Former Member
0 Likes
1,276

Satish,

i would suggest you to search in SDN with term Inner join Vs For all entries you will get your answer.

Amit.

Read only

Former Member
0 Likes
1,276

Hi,

For all entries

The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger

than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause.

The plus

Large amount of data

Mixing processing and reading of data

Fast internal reprocessing of data

Fast

The Minus

Difficult to program/understand

Memory could be critical (use FREE or PACKAGE size)

Some steps that might make FOR ALL ENTRIES more efficient:

Removing duplicates from the the driver table

Sorting the driver table

If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement:

FOR ALL ENTRIES IN i_tab

WHERE mykey >= i_tab-low and

mykey <= i_tab-high.

Select using JOINS

The plus

Very large amount of data

Similar to Nested selects - when the accesses are planned by the programmer

In some cases the fastest

Not so memory critical

The minus

Very difficult to program/understand

Mixing processing and reading of data not possible

Reward Points if useful

Raghunath.S

9986076729

Read only

Former Member
0 Likes
1,276

Hi satish,

Joins are used to have the matching records of tables, for this we use inner joins, whereas in outerjoins, we've leftouter and rightouter joins.

Leftouter : here all records of leftmost table will display by placing blanks or zeroes for rightsided table. Rightouter : here all records from rightmost table will display These joins are only for tables of relation 1 to n.

But to support for n to n, n to 1 tables we've to go for FOR ALL ENTRIES. In performance view, it is preferred over joins.

Regards,

Bhumika

Read only

Former Member
0 Likes
1,276

Hi Satish,

Check these links:

Check this blog:

Check this link, for how FOR ALL ENTRIES have better performance:

http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_ForAllEntries.asp

Hope this helps you.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
1,276

Hi Satish.

I would like to suggest a few references, similar to your case,

[SDN - Reference - How to use inner join and for all entries?|;

[SDN - Reference for Difference between inner join and for all entries|;

[SDN - Reference for INNER JOIN with FOR ALL ENTRIES IN Performance|;

[SDN - Reference for Inner Joins & for all entries with example|;

[SDN - Reference for Inner join Vs For all entries|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave