MySQL Forums
Forum List  »  Optimizer & Parser

Re: Use of DISTINCT in INNER JOIN
Posted by: Rick James
Date: March 25, 2009 07:01PM

tab2 has the PK on (col1, col2), but your query is looking for DISTINCT values of (col1, col2) for tab1. There is no compound index for them on tab1, nor do the ON/WHERE clauses indicate that col2 is the same in both tables. Perhaps a typo?

Options: ReplyQuote


Subject
Views
Written By
Posted
69869
March 24, 2009 12:07PM
11221
March 24, 2009 02:00PM
Re: Use of DISTINCT in INNER JOIN
6957
March 25, 2009 07:01PM
6671
March 27, 2009 05:20AM
5896
March 27, 2009 10:01AM
6850
March 28, 2009 02:02AM
4717
March 28, 2009 03:53PM
5924
April 01, 2009 03:36AM
6197
April 02, 2009 12:16AM
5676
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.