Relational Operator - Cross Product


The set cartesian product applied to a set of row (ie a tables) create all pairs of tuples (row).

A cross-join (also called Cartesian join) occurs when a request does not have a join condition between two tables. We say that the inner table is not driven from (not dependent on) the outer table.

That creates a cartesian product of the tables involved in the join. The size of a cartesian product is the number of rows in the first table multiplied by the number of rows in the second table.

In other word, if the inner table's access path is independent of the outer table, then the same rows are retrieved for every iteration of the outer loop.

The cartesian product in named for Rene Descartes.


A cross (times) <MATH> \LARGE R1 \times R2 </MATH>



The size of this cross-join is then the size of the first table (R1) multiplied by the size of the second table (R2).


Find all pairs of similar images/tweets/songs


Powered by ComboStrap