MySQL Forums
Forum List  »  Optimizer & Parser

Re: Use of DISTINCT in INNER JOIN
Posted by: Steve Croall
Date: March 28, 2009 02:02AM

Ok, thanks. We will just have to be careful anywhere we use DISTINCT and JOINs.

I still don't know why it has to do a full table scan in order to process the DISTINCT on the two columns. Surely it has only to go through the result set generated by the JOIN.

Is it because the use of the DISTINCT clause causes the ON clause not to use the available index? Without DISTINCT the index is used.

Options: ReplyQuote


Subject
Views
Written By
Posted
70081
March 24, 2009 12:07PM
11241
March 24, 2009 02:00PM
6981
March 25, 2009 07:01PM
6700
March 27, 2009 05:20AM
5915
March 27, 2009 10:01AM
Re: Use of DISTINCT in INNER JOIN
6868
March 28, 2009 02:02AM
4738
March 28, 2009 03:53PM
5944
April 01, 2009 03:36AM
6221
April 02, 2009 12:16AM
5692
April 02, 2009 06:29AM


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.