Home » RDBMS Server » Performance Tuning » materalized view
materalized view [message #472726] Mon, 23 August 2010 08:57 Go to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
CREATE MATERIALIZED VIEW MVIEW_REST_SET_LAYR
BUILD IMMEDIATE
refresh FORCE START WITH SYSDATE NEXT SYSDATE + 6/24 WITH ROWID
--REFRESH FAST ENABLE QUERY REWRITE
AS
SELECT RD.REST_ID, RD.ASN_SET_TYP, RD.REST_INST_ID, RD.PREN_SET_ID, RD.CUSM_SET_ID,
RD.DLTD_FL REST_DATA_DLTD_FL,
SL.SET_LAYR_ID, SL.TOP, SL.LEAF, SL.DLTD_FL SET_LAYR_DLTD_FL, SL.CHLD_SET_ID, SL.INHR_ORD
FROM REST_DATA@DB_LINK_MCD3 RD, SET_LAYR@DB_LINK_MCD3 SL
WHERE SL.PREN_SET_ID = RD.PREN_SET_ID

giving error:oRA-12052: cannot fast refresh
Re: materalized view [message #472727 is a reply to message #472726] Mon, 23 August 2010 08:59 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
It would be helpful if you provided Test Case - http://www.orafaq.com/wiki/Test_case
It would be helpful if you provided expected/desired results & a detailed explanation how & why the test data gets transformed or organized.

12052, 00000, "cannot fast refresh materialized view %s.%s"
// *Cause:  Either ROWIDs of certain tables were missing in the definition or
//          the inner table of an outer join did not have UNIQUE constraints on
//          join columns.
// *Action: Specify the FORCE or COMPLETE option. If this error is got
//          during creation, the materialized view definition may have be
//          changed. Refer to the documentation on materialized views.
//

[Updated on: Mon, 23 August 2010 09:01]

Report message to a moderator

Re: materalized view [message #472728 is a reply to message #472727] Mon, 23 August 2010 09:11 Go to previous messageGo to next message
cookiemonster
Messages: 13958
Registered: September 2008
Location: Rainy Manchester
Senior Member
I don't believe you can do fast refresh on a materialized view that queries tables across a DB link.
Re: materalized view [message #472734 is a reply to message #472728] Mon, 23 August 2010 09:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
cookiemonster wrote on Mon, 23 August 2010 16:11
I don't believe you can do fast refresh on a materialized view that queries tables across a DB link.

Yes you can and there is an example in SQL Reference CREATE MVIEW page.

Regards
Michel

Re: materalized view [message #472736 is a reply to message #472726] Mon, 23 August 2010 09:27 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Database Advanced Replication
Chapter 3 Materialized View Concepts and Architecture
Section Determining the Fast Refresh Capabilities of a Materialized View

Regards
Michel
Previous Topic: Query
Next Topic: No Redo for DML?
Goto Forum:
  


Current Time: Fri Nov 22 08:04:37 CST 2024