List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:November 10 2011 8:22am
Subject:Re: Issue With Subqueries
View as plain text  
----- Original Message -----
> From: "Shawn Green (MySQL)" <>
> Simple math (set theory) suggests that all of the values of field1 on
> db2.table1 contain only copies or duplicates of the field1 values in
> the rows in db1.table1.


The "select count(distinct)"s show that db1.table1.field1 has a lot less unique values
than db2.table1.field1, so I'm kind of struggling to understand how 3516 unique values can
be mapped to a subset of 1063 unique values :-)

> SELECT db2.field1, db1.field1
> FROM db2.table1
> LEFT JOIN db1.table1
>    ON db2.field1 = db1.field1
> WHERE db1.field1 IS NULL;

That's the interesting bit, indeed - if that gives back a more sensible number (logic
dictates at least 2053 of the 3516 can not be the same as the 1063) it'll prove that there
is indeed a bug somewhere.

Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
Issue With SubqueriesMike Seda9 Nov
  • Re: Issue With SubqueriesMySQL)9 Nov
    • Re: Issue With SubqueriesJavier YĆ©venez9 Nov
      • Re: Issue With SubqueriesJohan De Meersman10 Nov
    • Re: Issue With SubqueriesJohan De Meersman10 Nov
Re: Issue With SubqueriesMike Seda9 Nov