Data Base Joins part two

Posted by Isha | 10:37 PM

Sort merge join

When a join is processed using the sort merge join access strategy, the following steps are performed:

The table records that correspond to the WHERE clause are selected

The tables in the join are sorted according to the JOIN condition

The table records are merged

For the SQL statement above, the selective WHERE condition for field CUOBJ, table VVBAP, and the selective WHERE condition for field OBJNR, table VVBAK are evaluated. The resulting sets are sorted according to VBELN. The results are then merged.

n If selective WHERE conditions exist for the relevant tables, a sort merge join is very effective. If the JOIN conditions are not selective for any of the relevant tables, the sort merge join access strategy is more effective than a nested loop. If there are more than two tables in the join, you can combine the nested loop and sort merge join access strategies.

Access staginess for data base joins

Nested loop: This strategy is relevant for database views and ABAP JOINs. First, the WHERE clause is used as a basis for selecting the (outer) table to be used for access. Next, starting from the outer table, the table records for the inner tables are selected according to the JOIN condition.

Sort merge join: First, the WHERE clause is evaluated for all tables in the join, and a resulting set is produced for each table. Each resulting set is sorted according to the JOIN conditions and then merged, also according to the JOIN conditions.


RELATED POST

DATA BASE JOINS PART ONE
Architecture of work flow
Business objects
EDI Tasks and roles
Work item and SAP IN box
Error notification process part one and two
Work item in EDI Work flow
EDI Work flow part one, two, three and four
EDI Interface testing
Out bound testing for EDI and part two
Inbound Process utilities

0 comments