

XXXX> with t1 as (select /*+ */ 1 as t, 2 as y from dual),Ģ t2 as (select /*+ */ 1 as t, 2 as y from dual)


Without the materialize hint the two queries have just been merged. Predicate Information (identified by operation id):Ģ39 bytes received via SQL*Net from clientġ rows processedLine 1, 2 and 4 show the creation and load of a global temporary table, and line 8 and 10 show that the optimiser is selecting from that table ( SYS_TEMP_0FD9D6609_9CC969DE). | 1 | TEMP TABLE TRANSFORMATION | | | | | |

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | XXXX> with t1 as (select /*+ MATERIALIZE */ 1 as t, 2 as y from dual),Ģ t2 as (select /*+ MATERIALIZE */ 1 as t, 2 as y from dual) Wherever the query is referenced in the rest of the query, it will select the results from the global temporary table instead of rerunning the statement. When you use the materialize hint, it instructs the optimiser to create a global temporary table and insert the data generated by the query in the with clause into it.
