MySQL Forums
Forum List  »  Optimizer & Parser

Re: MySQL subquery
Posted by: Øystein Grøvlen
Date: November 07, 2016 01:39AM


Yes, as long as the view does not contain aggregation functions, DISTINCT, GROUP BY, LIMIT or UNION, it will be possible to merge the view into the query. This should be easy to check by looking at the EXPLAIN output for the query. If the view is not merged you will see that the tables of the view have select_type DERIVED.

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote

Written By
October 27, 2016 02:51PM
October 28, 2016 01:03AM
November 06, 2016 08:50PM
Re: MySQL subquery
November 07, 2016 01:39AM

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.