‎2008 Jul 29 6:28 AM
‎2008 Jul 29 6:30 AM
‎2008 Jul 29 6:30 AM
hi,
first of all it is join not joints.
plz search u have lot of posts on this question.
‎2008 Jul 29 6:30 AM
Hi!
Don't ask interview questions here. Read the rules of engagement...
Search in sdn or google you'll get several answers
‎2008 Jul 29 6:31 AM
Hi Satish,
Refer to the link below:
http://it.toolbox.com/blogs/sap-on-db2/for-all-entries-vs-db2-join-8912
http://www.sap-img.com/abap/several-nested-inner-join-statements-can-be-inefficient.htm
With luck,
Pritam.
‎2008 Jul 29 6:32 AM
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
‎2008 Jul 29 6:32 AM
Hi,
Search SDN forum.
Check this links:for all entries:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/content.htm
Joins:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec77446011d189700000e8322d00/content.htm
Regards
Adil
‎2008 Jul 29 6:32 AM
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
‎2008 Jul 29 6:32 AM
‎2008 Jul 29 6:33 AM
‎2008 Jul 29 6:33 AM
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
‎2008 Jul 29 6:34 AM
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
‎2008 Jul 29 6:35 AM
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
‎2008 Jul 29 6:45 AM
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