Re: Too much time in Copy to Tmp Table
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.
Subject
Views
Written By
Posted
3360
October 01, 2015 11:55AM
Re: Too much time in Copy to Tmp Table
1190
October 02, 2015 02:08PM
992
October 05, 2015 02:36PM
970
October 05, 2015 02:48PM
1108
October 05, 2015 02:55PM
1005
October 06, 2015 10:32PM
1189
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.