MySQL Forums
Forum List  »  General

Re: Particular SQL takes more than 5 hours to run in SQL developer
Posted by: Peter Brawley
Date: May 03, 2016 03:22PM

Where Exists(...) is slow in early MySQL versions.

You're looking for duplicate i_requests.requestIDs? That would be ...

select requestID,count(*) as N
from i_requests
group by requestID
having N>1;

That may still be somewhat slow unless i_requests has an index that leads with requestID.

Options: ReplyQuote




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.