On Fri, Sep 17, 2010 at 3:51 AM, Shawn Green (MySQL) <
shawn.l.gr...@oracle.com> wrote:

>
> So if 10 rows of A match your conditions, 1 row from B match your
> conditions, and 10 rows from C match your conditions, then this query
> produces 10*1*10 total row combinations.
>

Umm. It's friday, so I may be rather off it, too, but aren't the conditions
inclusive ? They're AND, not OR. A Cartesian join on a(10 rows), b(1 row)
and c(10 rows) would produce as you say.

I would say that the number of rows is the number where
 * c.f3 is x, y or z
 * AND where b.f4 = yen
 * FROM the set produced by the join condition.


Check the number of rows in c that match f3 in (x, y, z).
Match those with rows in b as per join. This will yield the same or less
rows.
Filter those that match b.f4 = yen. This again will yield same or less.
Match those with a as per join. This, too, will yield same or less, and will
be your final number of rows.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

Reply via email to