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
12201
July 06, 2016 09:32AM
Re: inner join vs left join - huge performance difference
2896
July 06, 2016 12:00PM
1940
July 06, 2016 12:18PM
1570
July 06, 2016 12:29PM
1408
July 06, 2016 12:36PM
1464
July 06, 2016 12:44PM
1435
July 06, 2016 01:51PM
1435
July 06, 2016 02:32PM
1168
July 06, 2016 02:41PM
1290
July 08, 2016 11:58PM
1451
July 09, 2016 09:54AM
1553
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.