MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimizer misbehaves
Posted by: Drei Bit
Date: July 04, 2007 10:37AM

Hello,

I could but then i have to take care of the possible multiple columns with DISTINCT. The Result is not anymore satisfying than the one before:

explain
select distinct t1.* 
from t1
  join t2 on t2.id = t1.id
where t2.sometext like 'hall%';

-- results in:
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	eq_ref	PRIMARY	PRIMARY	4	t2.id	1	
1	SIMPLE	t2	range	ix_id,ix_sometext	ix_sometext	753	<null>	87	Using where; Using temporary

Now it is doing some temporary duplicate elimination. (Don't tell me to use the GROUP BY "trick")

cheers.
3bit



Edited 1 time(s). Last edit at 07/04/2007 10:51AM by Drei Bit.

Options: ReplyQuote


Subject
Views
Written By
Posted
3550
July 04, 2007 05:16AM
2449
July 04, 2007 07:26AM
Re: Optimizer misbehaves
2453
July 04, 2007 10:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.