Oracle - How to create a materialized view with FAST REFRESH and JOINS

前端 未结 4 1027
攒了一身酷
攒了一身酷 2020-12-01 06:16

So I\'m pretty sure Oracle supports this, so I have no idea what I\'m doing wrong. This code works:

CREATE MATERIALIZED VIEW MV_Test
  NOLOGGING
  CACHE
  B         


        
4条回答
  •  青春惊慌失措
    2020-12-01 07:02

    The key checks for FAST REFRESH includes the following:

    1) An Oracle materialized view log must be present for each base table.
    2) The RowIDs of all the base tables must appear in the SELECT list of the MVIEW query definition.
    3) If there are outer joins, unique constraints must be placed on the join columns of the inner table.
    

    No 3 is easy to miss and worth highlighting here

提交回复
热议问题