INCLUDING NEW VALUES  in materialized view log

CREATE MATERIALIZED VIEW products_mv
REFRESH FAST ON COMMIT
AS SELECT SUM(list_price - min_price), category_id
FROM product_information
GROUP BY category_id;
Could anybody tell me why INCLUDING NEW VALUES are necessary in materialized view log for such an aggregate materialized view?
Thanks,
P.

Answer depends on your need; do you need these values on your mv log -
http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/basicmv.htm#sthref545
Best regards.

Similar Messages

  • Materialized view (fast refresh mode) + Materialized view log on another DB

    Hi all,
    I created a materizalied view using this script :
    CREATE MATERIALIZED VIEW GIPS.DOSSIER_MEDICAL_MV2
    TABLESPACE GIPS_T
    NOCACHE
    NOLOGGING
    NOCOMPRESS
    NOPARALLEL
    BUILD IMMEDIATE
    USING INDEX
    TABLESPACE GIPS_I
    + REFRESH FAST ON DEMAND +
    START WITH TO_DATE('11-janv.-2011 16:00:00','dd-mon-yyyy hh24:mi:ss')
    NEXT sysdate (1/96)+
    AS
    SELECT N0_SEQ_BLOB_PDF,
    EXAM_ID,
    MPR,
    RSM,
    rub,
    date_deb,
    SPE,
    commentaire,
    SPR,
    MEP,
    MSJ,
    TTD,
    exam_type
    FROM DOSSIER_MEDICAL@dbdoc_lk
    WHERE DOSSIER_MEDICAL.EXAM_TYPE IN ('TELEM', 'SCANNER', 'EPPO_SECMED');
    So you can see I'm using a dblink in the select statement ( DBDOC_LK )
    On the DB referenced by this dblink, I created a materialized view log using this script :
    CREATE MATERIALIZED VIEW LOG ON "DOSMED"."DOSSIER_MEDICAL"
    TABLESPACE "DOC_T"
    WITH PRIMARY KEY
    INCLUDING NEW VALUES;
    The problem is that my materialized view has never refreshed since its creation ! and I don't understand why ?
    Can someone help me ?
    Thank you.

    The REFRESH schedule causes a job to be created for the execution of the Refresh. You should see this job in DBA_JOBS / USER_JOBS.
    The job would run only if the instance parameter JOB_QUEUE_PROCESSES is set to 1 or higher (the default is 0). This parameter can be modified dynamically with an ALTER SYSTEM command.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • How to CREATE MATERIALIZED VIEW LOG (MV fast refresh) with some JOINS

    Hi @ all,
    i'm trying to create a MATERIALIZED VIEW LOG for a fast refresh of a MATERIALIZED VIEW.
    It works fine with a simple Request in the MATERIALIZED VIEW:
    CREATE MATERIALIZED VIEW MV_ZOTD43_P
    TABLESPACE GDII
    BUILD IMMEDIATE
    REFRESH FORCE AS
    SELECT * FROM ZOTD43_P;
    COMMIT;
    CREATE MATERIALIZED VIEW LOG ON ZOTD43_P
    TABLESPACE "GDII"
    WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
    call DBMS_MVIEW.REFRESH('MV_ZOTD43_P', 'f');
    But when I use a complex SQL-Request with some JOINS (one of the Table with spatial Data) in the MATERIALIZED VIEW, I get an error:
    CREATE MATERIALIZED VIEW MV_TEST
    TABLESPACE GDII
    BUILD IMMEDIATE
    REFRESH FORCE AS
    SELECT lptd04_p.sst_nr AS sst_nr,
    lptd03_p.aaaa AS aaaa,
    lptd04_geom.geom as geom
    FROM lptd04_p lptd04_p
    JOIN lptd01_p lptd01_p ON lptd01_p.cre_nr = lptd04_p.sst_nr
    JOIN lptd04_geom ON lptd04_geom.sst_nr = lptd04_p.sst_nr
    JOIN lptd03_p lptd03_p ON lptd03_p.lief_nr = lptd04_p.lief_nr;
    COMMIT;
    CREATE MATERIALIZED VIEW LOG ON LPTD04_P
    TABLESPACE "GDII"
    WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
    call DBMS_MVIEW.REFRESH('MV_TEST', 'f');
    Error report:
    SQL Error: ORA-12004: REFRESH FAST kann für Materialized View "GDI"."MV_GDI_SST_STAMM" nicht benutzt werden
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2255
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2461
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2430
    ORA-06512: in Zeile 1
    12004. 00000 - "REFRESH FAST cannot be used for materialized view \"%s\".\"%s\""
    *Cause:    The materialized view log does not exist or cannot be used. PCT
    refresh is also not enabled on the materialized view
    *Action:   Use just REFRESH, which will reinstantiate the entire table.
    If a materialized view log exists and the form of the materialized
    view allows the use of a materialized view log or PCT refresh is
    possible after a given set of changes, REFRESH FAST will
    be available starting the next time the materialized view is
    refreshed.
    Am I doing something wrong or is it not possible CREATE MATERIALIZED VIEW LOG when the MATERIALIZED VIEW got some JOINS?
    Regards,
    Greq

    Thanks for the link Alessandro ,
    the error seems something to do with the Column-Type SDO_GEOMETRY, so
    i create a new thread in the Spatial Discussion forum:
    FAST REFRESHing of Oracle Materialized Views containing SDO_GEOMETRY column
    Regards,
    Greq

  • Query on Materialized view and materialized view log

    I am creating a materialized view something like this.but getting following error:
    ERROR at line 1:
    ORA-12032: cannot use rowid column from materialized view log on "SCOTT"."EMP"
    SQL> create snapshot log on scott.emp;
    Materialized view log created.
    SQL> create materialized view scott_emp refresh fast on demand as select deptno,sum(sal) sum_sal from scott.emp group by deptno;
    ERROR at line 1:
    ORA-12032: cannot use rowid column from materialized view log on "SCOTT"."EMP"
    Note when i have my query in materialized view as "select * from emp;" in place of
    "select deptno,sum(sal) sum_sal from scott.emp group by deptno;" This code works fine.
    How do i have a materialized with with a group by clause.
    Thanks in Advance

    Got the answer myself.
    I wasnt adding all the required columns.
    CREATE MATERIALIZED VIEW LOG ON scott.emp
    WITH SEQUENCE, ROWID (<all the required columns>)
    INCLUDING NEW VALUES;
    Anyways,
    Thanks guys...

  • Truncate table and materialized view log

    I user oracle 10 R2
    I have a table and on that table a materialized view log.
    I execute in a pl/sql procedure:
    1) execute immediate('drop materialized view log on tab1');
    then:
    2) execute immediate('truncate table tab1');
    3) Now I insert a lot of records in tab1
    4) execute immediate('create materialized view log on tab1 WITH rowid INCLUDING NEW VALUES');
    When I create the materialized view log I recieved this message:
    ora32321: refresh fast on tab2 unsupported after detail table truncate
    Why?

    Refresh fast after truncate operation on container table is not supported, regardless the container table is or is not partitioned.
    Perform a refresh complete.
    ORA-32321 :
    Cause:     A detail table has been truncated and no materialized view
         supports fast refersh after a detail table has been truncated
    Action:     Use REFRESH COMPLETE. Note: you can determine why your
         materialized view does not support fast refresh after TRUNCATE
         using the DBMS_MVIEW.EXPLAIN_MV() API.

  • Materialized view log and user....

    Hi,
    Assume that a user , let's call him A owns a table and another user B needs to create a materialized view log on the table who owns the A user.
    Whereas the user B do have all object privileges(direct priv insert, update, delete.. not via a role) on the table of user A he cannot create a mv log on this table on his schema....
    So, the stmts insert/update/delete on <tab_name> are successfully executed (having connected as user B).
    The error message "ORA-00942: table or view does not exist " appears when i issue the command:
    connect B/B;
    create materialized view log on tab_name with sequence including new values;
    Note: I use ORADB 10.2.0.4 and there is a synonym of tab_name to the user B (who tries to create the mv log on)...
    Is the above req. possible in any way...???
    Thank you,
    Sim

    The documentation says the following:
    The materialized view log is created in the same schema as the target master.HTH!

  • Will Materialized view log reduces the performance of DML statements on the master table

    Hi all,
    I need to refresh a on demand fast refresh Materialized view in Oracle 11GR2. For this purpose I created a Materialized view log on the table (Non partitioned) in which records will be inserted @ rate of 5000/day as follows.
    CREATE MATERIALIZED VIEW LOG ON NOTES NOLOGGING WITH PRIMARY KEY INCLUDING NEW VALUES;
    This table already has 20L records and adding this Mview log will reduce the DML performance on the table ?
    Please guide me on this.

    Having the base table maintain a materialised view log will have an impact on the speed of DML statements - they are doing extra work, which will take extra time. A more sensible question would be to ask whether it will have a significant impact, to which the answer is almost certainly "no".
    5000 records inserted a day is nothing. Adding a view log to the heap really shouldn't cause any trouble at all - but ultimately only your own testing can establish that.

  • CREATE MATERIALIZED VIEW LOG ERROR

    Quick question:
    This doesn't work:
    CREATE MATERIALIZED VIEW LOG ON STOCKMOVES
    NOCACHE
    LOGGING
    NOPARALLEL
    WITH PRIMARY KEY, (ITEMKEY,WAREHOUSE,AGENT,DOCUMENTID,STATUS,RATE,PRICE,DISCOUNTPRC,SUPPLYQUANTITY)
    INCLUDING NEW VALUES
    Fails with "ORA-00922: missing or invalid option" and points to "(ITEMKEY"
    Can't find what's wrong.

    Comma after PRIMARY KEY is not required.
    Regards,
    Archana
    "While one person hesitates because he feels inferior, the other is busy making mistakes and becoming superior."
    http://justoracle.blogspot.com/
    -----------------------

  • Materialized View Log

    Hi,
    I would like to create Fast refresh Materialized View in owb
    Create Materialized View F_CALL_DAY_MV PARALLEL LOGGING BUILD IMMEDIATE REFRESH FAST ENABLE QUERY REWRITE AS
    SELECT
    FCALL.ACCOUNT_DIM_ID,
    FCALL.INVOICE_DIM_ID,
    FCALL.SCHEDULER_DIM_ID,
    FCALL.CHAIRPERSON_DIM_ID,
    FCALL.DATE_DIM_ID,
    FCALL.RESERVATION_DIM_ID,
    FCALL.PRODUCT_DIM_ID,
    FCALL.CALL_STATUS_DIM_ID,
    FCALL.REVENUE_CENTER_DIM_ID,
    FCALL.CAMPAIGN_DIM_ID,
    FCALL.SALESPERSON_DIM_ID,
    count(*),
    count (FCALL.CAMPAIGN_ELAPSED_DAYS_TO_CALL) cnt_CAMP_ELAPSED_DAYS_TO_CALL,
    AVG(FCALL.CAMPAIGN_ELAPSED_DAYS_TO_CALL) AVG_CAMP_ELAPSED_DAYS_TO_CALL,
    SUM(FCALL.SCHEDULED_CONNECTIONS) SCHEDULED_CONNECTIONS,
    SUM(FCALL.ACTUAL_CONNECTIONS) ACTUAL_CONNECTIONS,
    DDATE.THE_DATE,
    DDATE.YEAR_NUM,
    DDATE.MONTH_NUM,
    DDATE.WEEK_OF_THE_YEAR,
    DACCOUNT.BILL_ACCOUNT_CD,
    DACCOUNT.ACCOUNT_NM,
    DCHAIRPERSON.CONTACT_FULL_NAME,
    DCHAIRPERSON.CONTACT_FULL_ADDRESS,
    DCHAIRPERSON.MAIN_PHONE_NUM,
    DCHAIRPERSON.MOBILE_PHONE_NUM,
    DCHAIRPERSON.EMAIL_ADDR
    FROM F_CALL FCALL,
    D_ACCOUNT DACCOUNT,
    D_CALL DCALL,
         D_INVOICE D_INVOICE,
         D_SCHEDULER DSCHEDULER,
         D_CHAIRPERSON DCHAIRPERSON,
         D_DATE DDATE,
         D_RESERVATION DRESERVATION,
    D_PRODUCT DPRODUCT,
         D_CALL_STATUS DCALLSTATUS,
         D_REVENUE_CENTER DREVENUECENTER,
         D_CAMPAIGN DCAMPAIGN,
         D_SALESPERSON DSALESPERSON
    WHERE FCALL.ACCOUNT_DIM_ID = DACCOUNT.ACCOUNT_DIM_ID
    AND FCALL.CALL_DIM_ID = DCALL.CALL_DIM_ID
    AND FCALL.INVOICE_DIM_ID = D_INVOICE.INVOICE_DIM_ID
    AND FCALL.SCHEDULER_DIM_ID = DSCHEDULER.SCHEDULER_DIM_ID
    AND FCALL.CHAIRPERSON_DIM_ID = DCHAIRPERSON.CHAIRPERSON_DIM_ID
    AND FCALL.DATE_DIM_ID = DDATE.DATE_DIM_ID
    AND FCALL.RESERVATION_DIM_ID = DRESERVATION.RESERVATION_DIM_ID
    AND FCALL.PRODUCT_DIM_ID = DPRODUCT.PRODUCT_DIM_ID
    AND FCALL.CALL_STATUS_DIM_ID = DCALLSTATUS.CALL_STATUS_DIM_ID
    AND FCALL.REVENUE_CENTER_DIM_ID = DREVENUECENTER.REVENUE_CENTER_DIM_ID
    AND FCALL.CAMPAIGN_DIM_ID = DCAMPAIGN.CAMPAIGN_DIM_ID
    AND FCALL.SALESPERSON_DIM_ID = DSALESPERSON.SALESPERSON_DIM_ID
    GROUP BY
    FCALL.ACCOUNT_DIM_ID,
    FCALL.INVOICE_DIM_ID,
    FCALL.SCHEDULER_DIM_ID,
    FCALL.CHAIRPERSON_DIM_ID,
    FCALL.DATE_DIM_ID,
    FCALL.RESERVATION_DIM_ID,
    FCALL.PRODUCT_DIM_ID,
    FCALL.CALL_STATUS_DIM_ID,
    FCALL.REVENUE_CENTER_DIM_ID,
    FCALL.CAMPAIGN_DIM_ID,
    FCALL.SALESPERSON_DIM_ID,
    DDATE.THE_DATE,
    DDATE.YEAR_NUM,
    DDATE.MONTH_NUM,
    DDATE.WEEK_OF_THE_YEAR,
    DACCOUNT.BILL_ACCOUNT_CD,
    DACCOUNT.ACCOUNT_NM,
    DCHAIRPERSON.CONTACT_FULL_NAME,
    DCHAIRPERSON.CONTACT_FULL_ADDRESS,
    DCHAIRPERSON.MAIN_PHONE_NUM,
    DCHAIRPERSON.MOBILE_PHONE_NUM,
    DCHAIRPERSON.EMAIL_ADDR
    For this i need to create Materialized View Log as specified below for all the tables
    used for creating above MV
    CREATE MATERIALIZED VIEW LOG ON D_SALESPERSON
    WITH ROWID, SEQUENCE(SALESPERSON_DIM_ID)
    INCLUDING NEW VALUES;
    But i'm not able to create MV log in oracle warehouse builder as specified above. When i specify base tables in owb it creates default mv log as
    CREATE MATERIALIZED VIEW LOG ON D_SALESPERSON but i need to create MV log with "WITH ROWID, SEQUENCE(SALESPERSON_DIM_ID)
    INCLUDING NEW VALUES"
    Please could you help me to resolve this issue
    Thanks
    Kavitha

    Hi,
    I would just create the MV Log manually from SQL*Plus.
    Best regards,
    Erik

  • Materialized view log update question

    Hi, I am running into a question regarding mview - not sure if it should behave that way or I didn't use it right.
    I have two base tables, sales and customers (drived from nested materialized view example in oracle doc):
    CREATE TABLE sales
    cust_ID VARCHAR2(32 BYTE) NOT NULL,
    amount_sold NUMBER,
    TEMP VARCHAR2(100 BYTE),
    CONSTRAINT sales_pk PRIMARY KEY (cust_id)
    CREATE TABLE customers
    cust_ID VARCHAR2(32 BYTE) NOT NULL,
    CUST_LAST_NAME VARCHAR2(100 BYTE),
    TEMP VARCHAR2(100 BYTE),
    CONSTRAINT cust_pk PRIMARY KEY (cust_id)
    CREATE MATERIALIZED VIEW LOG ON sales
    WITH ROWID (cust_id, amount_sold);
    CREATE MATERIALIZED VIEW LOG ON customers
    WITH ROWID (cust_id, cust_last_name);
    Then I create a fast refresh materialized view based on them:
    CREATE MATERIALIZED VIEW join_sales_cust
    REFRESH FAST ON DEMAND AS
    SELECT c.cust_id, c.cust_last_name, s.amount_sold, s.rowid srid, c.rowid crid
    FROM sales s, customers c
    WHERE s.cust_id = c.cust_id;
    Since this materialized view only invole cust_id and amount_sold from sales and cust_id and last_name from customers table, I do not want to trigger materialized view log entry if the TEMP column value gets updated. So follow update shouldn't trigger mlog:
    update sales set TEMP='TEMP2' where cust_id=1
    but this update should:
    update sales set amount_sold=3 where cust_id=1
    What I am seeing happenning is any update on the base table will triger mlog entried regardless whether the column is involed in the materialized view or not.
    Can someone please confirm if this is the correct behavior and whether there is a way to accomplish what I wanted to do?
    Thank you!
    Edited by: user3933488 on Jan 8, 2010 12:53 PM

    You created the materialized view logs with some columns, which is not necessary when creating a join MV on top of them. You can happily skip those in your MV log definition. And then it becomes clear that those columns are not involved in the decision whether a MV log needs to be updated or not. Everything that happens to the base table gets recorded. The "WITH ROWID" and "INCLUDING NEW VALUES" and the column list only specify WHAT should be recorded when something changed.
    Regards,
    Rob.

  • How do I use Primary Key and RowID in Materialized View Logs and MVs

    How do I use Primary Key and RowID in Materialized View Logs and Materialized Views????
    I don’t understand in the Materalized View Logs the diference between Primary Key and RowID. Besides, I could choose both Primary Key and RowID.
    When I have to use RowID?? Why?? And Primary Key??? And both, Primary Key and RowID????
    Thank you very much!

    Yes, I have already read it...
    But for example I don’t Understand:
    This is the example 8-1
    CREATE MATERIALIZED VIEW LOG ON products
    WITH SEQUENCE, ROWID
    (prod_id, prod_name, prod_desc, prod_subcategory, prod_subcat_desc, prod_
    category, prod_cat_desc, prod_weight_class, prod_unit_of_measure, prod_pack_
    size, supplier_id, prod_status, prod_list_price, prod_min_price)
    INCLUDING NEW VALUES;
    But if I create a Materialized View with TOAD if I choose a KEY field I receive the error:
    ORA-12026: invalid filter column detected
    Then I have to take out the Key (in the above example prod_id)
    And then the script is
    CREATE MATERIALIZED VIEW LOG ON products
    WITH ROWID, SEQUENCE, PRIMARY KEY!!!!!!!!!!!!!!!!!!!!
    (prod_id, prod_name, prod_desc, prod_subcategory, prod_subcat_desc, prod_
    category, prod_cat_desc, prod_weight_class, prod_unit_of_measure, prod_pack_
    size, supplier_id, prod_status, prod_list_price, prod_min_price)
    INCLUDING NEW VALUES;
    I have PRIMARY KEY in the definition (I don’t choose it) and I don’t have the prod_id field
    Why is it????
    Note: If I execute the script to create the MV Log manually the PRIMARY KEY option NO IS in the script and the prod_id field either is in the script.
    And on the other hand,
    What is this:
    CREATE MATERIALIZED VIEW LOG ON sales
    WITH ROWID;
    CREATE MATERIALIZED VIEW LOG ON times
    WITH ROWID;
    CREATE MATERIALIZED VIEW LOG ON customers
    WITH ROWID;
    These MATERIALIZED VIEW LOG contain any fields????
    Or it contain the primary key fields of this tables (sales, times and customers)??? Then, Why is it ROWID instead of PRIMARY KEY????
    Thanks!

  • Is it possible to create materialized view log file for force refresh

    Is it possible to create materialized view log file for force refresh with join condition.
    Say for example:
    CREATE MATERIALIZED VIEW VU1
    REFRESH FORCE
    ON DEMAND
    AS
    SELECT e.employee_id, d.department_id from emp e and departments d
    where e.department_id = d.department_id;
    how can we create log file using 2 tables?
    Also am copying M.View result to new table. Is it possible to have the same values into the new table once the m.view get refreshed?

    You cannot create a record as a materialized view within the Application Designer.
    But there is workaround.
    Create the record as a table within the Application Designer. Don't build it.
    Inside your database, create the materialized with same name and columns as the record created previously.
    After that, you'll be able to work on that record as for all other within the Peoplesoft tools.
    But keep in mind do never build that object, that'll drop your materialized view and create a table instead.
    Same problem exists for partitioned tables, for function based-indexes and some other objects database vendor dependant. Same workaround is used.
    Nicolas.

  • Overhead of Triggers VS Materialized View Logs

    If I need to log INSERTs, UPDTEs, and DELETEs on a table - is there a difference in the overhead of doing so via triggers vs MV logs?
    Thanks

    You said that MV log is marginally more efficient than a trigger. I am curious why. In what way do they work differently under the hood?If the essence of discussion is only why MV log is more efficient than trigger than I think Justin has pointed out below good technical points i.e.
    1.You don't have to pass control over to the PL/SQL engine.
    2.You're also writing the binary data that you'd put in the redo logs rather than column level data.
    And below text from docs :
    Internal Trigger for the Materialized View Log
    When changes are made to the master table or master materialized view using DML, an internal trigger records information about the affected rows in the materialized view log. This information includes the values of the primary key, rowid, or object id, or both, as well as the values of the other columns logged in the materialized view log. This is an internal AFTER ROW trigger that is automatically activated when you create a materialized view log for the target master table or master materialized view. It inserts a row into the materialized view log whenever an INSERT, UPDATE, or DELETE statement modifies the table's data. This trigger is always the last trigger to fire.http://docs.oracle.com/cd/B28359_01/server.111/b28326/repmview.htm#i30732
    3.Trigger i.e. we are coding to track the changes, MV log i.e. tool/technology which is provided by Oracle itself; so definately "We are not that much capable to write the code which is equal or more efficient than Oracle itself right ?"
    In fact, functionality of MV is Instead of Trigger, but under the cover, with near to Oracle's internals.
    Regards
    Girish Sharma

  • Creating a Materialized View Log After the Data has been instered

    Hi,
    I am trying to create a method of replication from Oracle to MySQL using the Materialized View Log table.
    This has been done before and works quite well, the only problem is that I am trying to impliment the log after the table has been created and populated and wish to push all the existing data through the log file...
    Does anyone know if it is possible to refresh the Materialized View Log and not a Materialized View.
    The way the replication is intended to work is:
    Oracle> Data inserted into table
    Oracle> writes the vector data to the MVL
    Script> Monitors the MVL and can see the changes being made to the Oracle Table
    Script> Updates MySQL with the data and removes the rows from the MVL
    MySQL is then used with other unix systems
    Currently we export the data from the table using Triggers and a cronjob running every x minute to check for changes in the TriggerTables
    Many thanks for your time on this, I have been checking for almost a whole working day and not found the answer to this problem.

    Thats what I thought, the MVL will only read data that has changed since it was created and wont have the option to load in all the data as though it was made before the table was created.
    From what I have read, the MVL is quicker than a Trigger and I have some free code that prooved to work from a MVL using it as a reference to know what records to update. There is not that much to a MVL, a record ID and type of update, New, Update or Delete.
    I think what I will have to do is work on a the same principle for the MVL but use a Trigger as this way we can do a full reload if required at any point.
    Many thanks for your help.

  • Can't update master table when creating a materialized view log.

    Hi all,
    I am facing a very strange issue when trying to update a table on which I have created a materialized view log (to enable downstream fast refresh of MV's). The database I am working on is 10.2.0.4. Here is my issue:
    1. I can successfully update (via merge) a dimension table, call it TABLEA, with 100k updates. However when I create a materialized view log on TABLEA the merge statement hangs (I killed the query after leaving it to run for 8 hrs!). TABLEA has 11m records and has a number of indexes (bitmaps and btree) and constraints on it.
    2. I then create a copy of TABLEA, call it TABLEB and re-created all the indexes and constraints that exist on TABLEA. I created a materialzied view log on TABLEB and ran the same update....the merge completed in under 5min!
    The only difference between TABLEA and TABLEB is that the dimension TABLEA is referenced by a number of FACT tables (by FKs on the FACTS) however this surely should not cause a problem. I don't understand why the merge on TABLEA is not completing...even though it works fine on its copy TABLEB? I have tried rebuilding the indexes on TABLEA but this did not work.
    Any help or ideas on this would be most appreciated.
    Kind Regards
    Mitesh
    email: [email protected]

    Thats what I thought, the MVL will only read data that has changed since it was created and wont have the option to load in all the data as though it was made before the table was created.
    From what I have read, the MVL is quicker than a Trigger and I have some free code that prooved to work from a MVL using it as a reference to know what records to update. There is not that much to a MVL, a record ID and type of update, New, Update or Delete.
    I think what I will have to do is work on a the same principle for the MVL but use a Trigger as this way we can do a full reload if required at any point.
    Many thanks for your help.

Maybe you are looking for