MySQL Forums
Forum List  »  Optimizer & Parser

Re: MYSQL optimizer: Handling Subqueires
Posted by: Rick James
Date: August 18, 2009 06:38PM

I believe the optimizer actually executes the subquery (after optimizing it) before optimizing the outer query. I once saw a query that took 13 hours to EXPLAIN. I tried the inner query manully; it took 13 hours to run, so I jumped to a conclusion.

It is usually more optimal to turn subqueries into JOINs.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MYSQL optimizer: Handling Subqueires
2057
August 18, 2009 06:38PM


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.