MySQL Forums
Forum List  »  Performance

Re: Too much time in Copy to Tmp Table
Posted by: Peter Brawley
Date: October 02, 2015 02:08PM

IN( SELECT ... ) doesn't optimise well in MySQL. Multiple such clauses do worse. You're likely to get better performance by turning those semi-joins into Joins.

Multiple Where clause ORs are likely to defeat indexing improvements. I haven't tried to work out if some of those ORs are compatible with range scan optimisations, but first impression is that they aren't.

Mainly, MySQL can use one index per table. When you get rid of the IN(SELECT...) clauses and mebbe temporarily comment out all the ORs, you might want to try designing a covering index that will help more with the main clause.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Too much time in Copy to Tmp Table
1080
October 02, 2015 02:08PM
1097
October 08, 2015 07:21PM


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.