MySQL Forums
Forum List  »  Performance

Re: bad Join Performance
Posted by: Rick James
Date: November 02, 2011 06:23AM

FROM base
INNER JOIN base REV0 USE INDEX(tag_hash) ON REV0.`hash`=base.`hash`
INNER JOIN base REV1 USE INDEX(tag_hash) ON REV1.`hash`=base.`hash`

Why the heck do you have the same table 3 times? Is `hash` unique? If so, it makes no sense; you could simply use one copy of the table. If there are 10 rows with a given `hash`, you are asking for 1000 rows in this JOIN (10*10*10). Why?

Options: ReplyQuote


Subject
Views
Written By
Posted
3729
October 31, 2011 12:21AM
1087
October 31, 2011 12:41PM
935
November 01, 2011 12:12AM
1163
November 01, 2011 12:26AM
950
November 01, 2011 03:33AM
1051
November 01, 2011 08:29AM
966
November 02, 2011 08:21AM
885
November 03, 2011 12:56AM
899
November 03, 2011 12:24AM
1033
November 04, 2011 06:35AM
Re: bad Join Performance
987
November 02, 2011 06:23AM
900
November 02, 2011 07:42AM


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.