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
12417
July 06, 2016 09:32AM
Re: inner join vs left join - huge performance difference
3009
July 06, 2016 12:00PM
2029
July 06, 2016 12:18PM
1668
July 06, 2016 12:29PM
1451
July 06, 2016 12:36PM
1514
July 06, 2016 12:44PM
1494
July 06, 2016 01:51PM
1491
July 06, 2016 02:32PM
1220
July 06, 2016 02:41PM
1336
July 08, 2016 11:58PM
1490
July 09, 2016 09:54AM
1654
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.