MySQL Forums
Forum List  »  Performance

Re: "Sending Data" is taking time post migration from 5.1 to 5.6
Posted by: Peter Brawley
Date: March 14, 2017 09:42AM

Ah, you neglected to mention that the Update has a Join!

update bct_va_res1_tmp a
join bct_prod b on a.head_prodno=b.prodno and a.head_rstate=b.rstate
set a.description=b.description
where a.level=0 ;

MySQL can't find an index for b so it's having to examine 113*556464=62,880,432 rows; bct_prod needs index(prodno,rstate).

Options: ReplyQuote

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.