
Well, that depends on your data and what you mean by “efficient”. You have to know the following:
• the relationship between the tables
• the sparseness or density of matches
• the size of the tables
• the availability of an index or sort flag
When data sets are large and unsorted, the SQL inner join might outperform SORT and MERGE. If you have a long
series of SORT and DATA steps, the SQL inner join might be easier to code and read.
In most cases, a DATA step MERGE statement generally outperforms an SQL outer join, even taking sort resources
into account.
One exception is a very sparse match join when you only want the observations with matching key values.