WITH Clauses in SELECT
WITH
clauses are concomitant queries within a larger, primary query. Vertica can evaluate WITH
clauses in two ways:
- Inline expansion (default): Vertica evaluates each
WITH
clause every time it is referenced by the primary query. - Materialization: Vertica evaluates each
WITH
clause once, stores results in a temporary table, and references this table as often as the query requires.
For details on WITH
clause syntax and requirements, see WITH Clause in the SQL Reference Manual.