List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:February 17 2000 4:41am
Subject:Re: SELECT DISTINCT
View as plain text  
On Wed, Feb 16, 2000 at 05:29:16PM -0700, Bob Jerrard wrote:
>I seem to be having unusual affects with SELECT DISTINCT.  Things which
>I would have thought were distinct are not always picked up as such and
>things with are not distinct are not always pick up properly either. 
>The anomalies seems to have to do with TINYBLOB fields.  Can anyone tell
>me how or point me to information that tells me exactly how DISTINCT
>works, particularly with TINYBLOB fields?

Bob, look in the manual at the section on "The `BLOB' and `TEXT' types".
The paragraph starting "Because `BLOB' and `TEXT' values may be extremely
long, ..." talks about GROUP BY and ORDER BY.  Since DISTINCT is converted
to a GROUP BY (see the section "How MySQL optimizes `WHERE' clauses"),
those restrictions apply to DISTINCT as well.

That may be the source of your troubles...I don't know - I'm not sure that
a TINYBLOB would exercise those restrictions.

Tim
Thread
SELECT DISTINCTBob Jerrard17 Feb
  • SELECT COUNT(DISTINCT ....Albert Ng17 Feb
    • Re: SELECT COUNT(DISTINCT ....Paul DuBois17 Feb
  • Re: SELECT DISTINCTThimble Smith17 Feb