with temp_tb 

SELECT /*+ materialize  parallel(a,8) */  c1,c2 
FROM a 
WHERE ..... 

select * from temp_tb 我知道parallel(a,8)是并行, 
物化视图要用到‘materialized’, 
问题:
在上面这段代码中有‘materialize’没有‘materialize’有啥区别?

解决方案 »

  1.   

    with -- 相当于全局临时表materialize -- 10g中有没有materialize没有区别Note the use of the Oracle undocumented “materialize” hint in the “WITH clause”.  The Oracle materialize hint is used to ensure that the Oracle cost-based optimizer materializes the temporary tables that are created inside the “WITH” clause.  This is not necessary in Oracle10g, but it helps ensure that the tables are only created one time.http://www.dba-oracle.com/t_materialize_sql_hint.htm