Re: inner join vs left join - huge performance difference
Comma join syntax (select ... from a,b where ...) is not recommended in MySQL since version 5.0,12. Join...On syntax is recommended.
Left Join requires the query engine to read all data rows on the left side of the join. Your table is evidently big, and you're using datetime funcs that MySQL can't index. You might get a quick fix by adding a computed column for the 3-hour-incremented timestamp to your first query, saving the result as an intermediate table, adding an index on the columns to be compared, then picking off the desired rows from that.
Subject
Views
Written By
Posted
12846
July 06, 2016 09:32AM
Re: inner join vs left join - huge performance difference
3217
July 06, 2016 12:00PM
2191
July 06, 2016 12:18PM
1764
July 06, 2016 12:29PM
1558
July 06, 2016 12:36PM
1618
July 06, 2016 12:44PM
1610
July 06, 2016 01:51PM
1636
July 06, 2016 02:32PM
1329
July 06, 2016 02:41PM
1439
July 08, 2016 11:58PM
1566
July 09, 2016 09:54AM
1756
September 27, 2016 07:13AM
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.