Skip to content

Commit

Permalink
TEIID-4440 documenting the materialize option
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Sep 14, 2016
1 parent 5097288 commit d051283
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions reference/WITH_Clause.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ Usage:

[source,sql]
----
WITH name [(column, ...)] AS [/*+ no_inline*/] (query expression) ...
WITH name [(column, ...)] AS [/*+ no_inline|materialize */] (query expression) ...
----

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.

Expand Down

0 comments on commit d051283

Please sign in to comment.