Views are virtual tables, which hide selected queries. These queries need to be executed, which is done by selecting a statement from a view. Once we select the statement from a view, it executes it, given that it is inside the view body.
- Image Courtesy: oracleatoz.com
Materialized view (Mview)
These are a special type of view. Mviews are used when there are issues with views.
When we create an mview, it creates a snapshot table, after it executes a select query. Mviews do not need to re-execute date, should you need it later. However, they cannot be used all the time, since they display the same output which was initially stored as a snapshot table. Their major positive is the speed at which they operate.
- Image Courtesy: blogspot.com