DELETE ADJACENT DUPLICATES prevents duplication of records in the internal table (and therefore, multiple reads of the same data). The internal table, in principle, can be as large as you want.
It is recommended that you use the FOR ALL ENTRIES addition when the first set of data is not being read from the database and is already available in the program, for example, if the user has input the data. Otherwise, a join is recommended.
Nested SELECT Statements
Nested SELECT statements are another method to read related tables. Avoid this technique and use it only as a last resort when no other data retrieval method is possible.
The major disadvantage of nested SELECT statements is that the inner SELECT is executed for each record that is retrieved by the outer SELECT statements. Under these circumstances, good performance is only possible if you ensure that the table with the smallest number of expected records is outermost in the nesting structure.