MySQL Forums
Forum List  »  Performance

Re: slow response when where clause has a field from 2nd table in a left join
Posted by: Rick James
Date: February 15, 2016 04:17PM

Your title (LEFT JOIN) disagrees with your code (INNER JOIN). Either way...

OR is the villain.

Here is a workaround:

select * from `history` where `cascade` = 'abc'
UNION DISTINCT
select * from `history` where `element` = 'abc';

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: slow response when where clause has a field from 2nd table in a left join
602
February 15, 2016 04:17PM


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.