Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Materialized view needs to be compiled or refresh

BCVJun 19 2023

Hi ,

I have below script to create Materialized view with two tables involved.

i see data is automatically reflected when there a new data inserted in source tables after 24 hours as i mentioned REFRESH in my script .

do i still need to refresh the Materialized view manually or This script is enough to take care of auto refresh . I am in confusion , please advise .

CREATE MATERIALIZED VIEW MVW_ITEM (Item_id ,Item_cost )
BUILD IMMEDIATE
USING INDEX
REFRESH COMPLETE START WITH SYSDATE+0 next SYSDATE + 1
USING DEFAULT LOCAL ROLLBACK SEGMENT
USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE

select Item_id , Item_cost from item_dict , item_dtls

where item_dict.item_id = item_dtls.item_id

This post has been answered by Paulzip on Jun 21 2023
Jump to Answer
Comments
Post Details
Added on Jun 19 2023
3 comments
1,634 views