Sentry Page Protection
Programming Tips 3
Conceptually, SAS creates a Cartesian product whenever it executes a Proc SQL join.
In reality, SAS uses an optimizer to optimize the process of creating the Cartesian product.
The queries are processed in a much more efficient way.
Below is the official description of how the Proc SQL join and the Cartesian product are processed.
The PROC SQL query optimizer follows a more complex process than the conceptual approach described here, by breaking the Cartesian product into smaller pieces. For each query, the optimizer selects the most efficient processing method for the specific situation.
The Proc SQL query optimizer is out of the scope of this training.