MySQL Forums
Forum List  »  Stored Procedures

Re: Fast function, slow SQL
Posted by: Peter Brawley
Date: June 01, 2013 12:46AM

sql 2 has to examine a billion rows (876*1176*1176).

sql 1 & 3 elicit the optimiser's dependent subquery mechanisms, which are smarter in 5.6 but as you illustrate, not smart enough yet. I bet sql 1 & 3 would've been a lot slower in 5.0.

The function version of the query avoids all those pits of despair---it just has to peek into a `tableb` index to get its values.

Options: ReplyQuote


Subject
Views
Written By
Posted
3941
May 10, 2013 02:13AM
Re: Fast function, slow SQL
1251
June 01, 2013 12:46AM


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.