Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    42

    Unanswered: Problems With Materialized View Log

    HI,
    I am facing a problem with Materialized View. Lets say I issued the following statements.

    CREATE TABLE TEST(n NUMBER(2) PRIMARY KEY,m NUMBER(2))

    CREATE MATERIALIZED VIEW LOG ON TEST LOGGING WITH PRIMARY KEY EXCLUDING NEW VALUES

    INSERT INTO TEST VALUES(12,13);

    UPDATE TEST SET m=14 WHERE n=12

    COMMIT;

    After this MLOG$_TEST CONTAINs 2 ROWS with DMLTYPE$$ as I for Inserted row and U for
    Updated row to refresh the Materialized View. The record structure is as follows

    N SNAPTIME$$ DMLTYPE$$ OLD_NEW$$ CHANGE_VECTOR$$
    ------------------------------------------------------------------------
    12 1/1/4000 I N FE
    12 1/1/4000 U U 04

    Is it possible that we can keep only one record in MLOG$_TEST for both the DML operations??

    Can anybody help me out??

    Thanks in advance.

    Regards
    Rasmi

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    How, You did two distinct actions. An Insert and an Update. A MLOG is used to track changes, so that the MVIEW can be updated with the changes during the refresh.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    I suggest also creating the materialized view.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •