Views
A view is a stored query that encapsulates one or more SELECT
statements. Views dynamically access and compute data from the database at execution time. A view is read-only, and can reference any combination of tables, temporary tables, and other views.
You can use views to achieve the following goals:
- Hide the complexity of SELECT statements from users for support or security purposes. For example, you can create a view that exposes only the data users need from various tables, while withholding sensitive data from the same tables.
- Encapsulate details about table structures, which might change over time, behind a consistent user interface.
Unlike projections, views are not materialized—that is, they do not store data on disk. Thus, the following restrictions apply:
- Vertica does not need to refresh view data when the underlying table data changes. However, a view does incur overhead to access and compute data.
- Views do not support inserts, deletes, or updates.