MySQL Forums
Forum List  »  Optimizer & Parser

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

Hi,

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


Subject
Views
Written By
Posted
1200
October 27, 2016 02:51PM
755
October 28, 2016 01:03AM
741
November 06, 2016 08:50PM
Re: MySQL subquery
749
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.