MySQL Forums
Forum List  »  Performance

Re: Time performance in query Inner Join
Posted by: Rick James
Date: July 07, 2011 10:29PM

In addition to Peter's toned down request, ...

Let's see the EXPLAIN for that SELECT.

SHOW TABLE STATUS LIKE '_tbl1';
SHOW TABLE STATUS LIKE '_tbl2';
might also help.

WHERE ... C.MCR_Cod ='DNO'
begs for
INDEX(MCR_Cod)

GROUP BY MCR_Cod, MCR_Clt, MCR_Den
Would probably benefit
INDEX(MCR_Cod, MCR_Clt, MCR_Den)

Don't add both indexes, only the longer one.

ALTER TABLE _tbl2
ADD INDEX(MCR_Cod, MCR_Clt, MCR_Den);

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Time performance in query Inner Join
891
July 07, 2011 10:29PM


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.