Question

I've created materialized view logs on a WORKORDER table in an Oracle 19c database.

create materialized view log on my_workorder_system.workorder with rowid;  

The plan is to integrate the WORKORDER records to a separate GIS system (Oracle 18c) via a materialized view.

The catch:

The WORKORDER table has both spatial and non-spatial workorder records in it (ISGIS = 0 or 1). I only need to sync the records to the GIS datdabase WHERE ISGIS = 1.

If I understand correctly, my materialized view in GIS will tell the MV logs in the workorder system to purge the log records after they're synced. However, the sync will only ever happen for workorders where ISGIS=1. The workorders where ISGIS=0 will never get synced — and therefore are not needed in the MV logs.

Is there a way to only generate MV logs for records that meet a condition?

For example:

create materialized view log on my_workorder_system.workorder with rowid where ISGISS=1.
Was it helpful?

Solution

MV logs are all or nothing; they have no visibility of criteria for any given MV. Any MV Log records will be purged up to the oldest common refresh date as soon as the source DB determines that all registered MVs have refreshed.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top