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
12569
July 06, 2016 09:32AM
Re: inner join vs left join - huge performance difference
3096
July 06, 2016 12:00PM
2096
July 06, 2016 12:18PM
1709
July 06, 2016 12:29PM
1497
July 06, 2016 12:36PM
1555
July 06, 2016 12:44PM
1544
July 06, 2016 01:51PM
1544
July 06, 2016 02:32PM
1267
July 06, 2016 02:41PM
1377
July 08, 2016 11:58PM
1526
July 09, 2016 09:54AM
1690
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.