diff --git a/reference/WITH_Clause.adoc b/reference/WITH_Clause.adoc index 20a2ce3c5b..8f28595722 100644 --- a/reference/WITH_Clause.adoc +++ b/reference/WITH_Clause.adoc @@ -7,7 +7,7 @@ Usage: [source,sql] ---- -WITH name [(column, ...)] AS [/*+ no_inline*/] (query expression) ... +WITH name [(column, ...)] AS [/*+ no_inline|materialize */] (query expression) ... ---- Syntax Rules: @@ -15,7 +15,10 @@ Syntax Rules: * All of the projected column names must be unique. If they are not unique, then the column name list must be provided. * If the columns of the WITH clause item are declared, then they must match the number of columns projected by the query expression. * Each with clause item must have a unique name. -* The optional no_inline hint indicates to the optimizer that the query expression should not be substituted inline where referenced. +* The optional no_inline hint indicates to the optimizer that the query expression should not be substituted as an inline view where referenced. +It is possible with no_inline for multiple evaluations of the common table as needed by source queries. +* The optional materialize hint requires that the common table be created as a temporary table in Teiid. This forces a single evaluation of the +common table. NOTE: The WITH clause is also subject to optimization and it’s entries may not be processed if they are not needed in the subsequent query.