笛卡尔连接是指在sql语句中没有写出表连接的条件或者表的连接条件不能约束两个表的连接,优化器把第一个表的每一条记录和第二个表的所有记录相连接。如果第一个表的记录数为m, 第二个表的记录数为n,则会产生m*n条记录数。
即使单个维度相对较小,随着每个维度的加入,笛卡尔连接也会成倍增长。
Even if the individual dimensions themselves are relatively small, the Cartesian join grows exponentially with each addition of a dimension.
在一个查询中不带事实数据连接三个或更多维度,也能产生大型笛卡尔连接。
Combining three or more dimensions in a query without fact data, can also cause large Cartesian joins.
由于伪事实的每个维度中的连接表达式的过滤,笛卡尔连接结果缩小了。
The Cartesian join is reduced by the filters found in the join expressions from each dimension to the fake fact.
应用推荐