Generally, MySQL merges a View into the query where it occurs, if it can, otherwise it runs he View separately, storing the result in a temporary table. Since 5.7, MySQL handles FROM clause subqueries and such Views the same.
Which isn't to say all is now well with MySQL Views, see http://www.mysqlperformanceblog.com/2007/08/12/mysql-view-as-performance-troublemaker/. Last updated 16 Aug 2024 |
![]() |