The New Home of Oracle-wiki.net

All things oracle...

A website for IT Professionals involved with Oracle database.

LinkLinkedIn

MATERIALIZE

Materialize Hint Description

The WITH query_name clause lets you assign a name to a subquery block. You can then reference the subquery block multiple places in the query by specifying the query name. Oracle Database optimizes the query by treating the query name as an inline view. You can force the inline view to a temporay table by using the unsupported hint /*+ MATERIALIZE */


Example

with MyQuery1 as (select /*+ MATERIALIZE */ MyCol1 from MyTable1)

select * from MyQuery1 a, MyTable2 b where a.MyCol1=b.MyCol2


Published on 

Published 1st January 2022