Materialized views showing with status NEEDS_COMPILE after refresh
Hi,
we have a process flow that loads a fact table, and then kicks off a refresh of the materialized view that depends on it. We're using partition change tracking, so we call the update using:
dbms_mview.refresh('mv_name', 'P');
About 50% of the time, this works fine. However, after the other 50%, we end up with the MV not being available for query rewrite, and when I do a "select * from user_mviews" - I can see the "staleness" column says NEEDS_COMPILE.
Does anyone have any ideas why this is occurring?
Thanks,
Scott