Creation of materialized view from remote linked table

Hi ,
I am facing problem in creating a materialized view which is based on remote link and my query is involving one equi-join.And both table contributes around 2.75 crore rows. I am trying to create two diff views(MV) but the views are taking very much time to create. If you have any ideas or suggestions.And also I want performance I cant compromise it,so help. Please post it down.
Thanks,

user13104802 wrote:
Hi ,
I am facing problem in creating a materialized view which is based on remote link and my query is involving one equi-join.And both table contributes around 2.75 crore rows. I am trying to create two diff views(MV) but the views are taking very much time to create. If you have any ideas or suggestions.And also I want performance I cant compromise it,so help. Please post it down.
Thanks,Welcome to the forum.
You will need to provide more information if you are interested in getting an intelligent response to your post. It appears that you are creating 2 different MVs but the details of each are not provided, ie
Where do each of the source tables exist, ie local or remote?
How many rows in each?
How will the MVs be refreshed?
There are other considerations, ie competition for resources, processing power, network bandwidth, etc, etc.
If all of the source tables exist on the remote database then consider creating the MV there and create a local view across the db link, or possibly, create a MV on the remote server for a subset of the remote data and link to that MV locally.

Similar Messages

  • Creation of Materialized view and Materialized view log.

    I wanted to create materialized view with 'REFRESH FAST ON COMMIT' option.
    1) Table1 --it is partitioned range + list -- Added primary key
    2) view1   -- having primary keys on view's base table
    Steps:
    1) create materialized view log on Table1 ; -- default primary key
    2) create materialized view log on view1.  --- It is giving below error.
    ORA-00942: table or view does not exist
    i wanted to create Materialized view like below
    create materialized view
    REFRESH fast ON commit
    as
    select ...
    ... from table1
    where c1 in (select c1 from view1 where ... );
    Question:
    1) As i am getting above error while creating MV log on view. Can we create MV log on view or we have to create MV log on view base table?
    2) To create MV with ''REFRESH FAST ON COMMIT' option , do we need to have primary key on master tables? 
    Any pointers on this will really helpful.
    Thanks
    Prasad

    Also created MV LOG on 3 tables and tried with joins ..
    create materialized view
    REFRESH fast ON commit
    as
    select ...
    ... from table1 , tab2 t2,tab3 t3
    where ....
    and ...
    Get same error ORA-12052: cannot fast refresh materialized view AVSYS.EVENT_LOG_MV
    2052. 00000 -  "cannot fast refresh materialized view %s.%s"
    *Cause:    Either ROWIDs of certain tables were missing in the definition or
               the inner table of an outer join did not have UNIQUE constraints on
               join columns.
    *Action:   Specify the FORCE or COMPLETE option. If this error is got
               during creation, the materialized view definition may have be
               changed. Refer to the documentation on materialized views.

  • ORA-12015: cannot create a fast refresh materialized view from a complex qu

    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionI'm trying to create a fast refresh materialized view that uses a column of xmltype. The problem is I cannot create an MV log that accounts for the xmltype column. I tried excluding it and got the above error. Is there another way I can incrementally update a materialized view where I don't have to do a COMPLETE refresh or use FAST refresh?
    CREATE TABLE "DAS_DESC"."AUTHORITY_TEST"
        "NAID"      NUMBER(20,0) NOT NULL ENABLE,
        "AUTH_TYPE" VARCHAR2(40 BYTE),
        "XML_DATA" "SYS"."XMLTYPE" ,
        "TERM_NAME" VARCHAR2(4000 BYTE)
    CREATE TABLE "DAS_DESC"."AUTH_ASSC_TEST"
        "NAID"    NUMBER(20,0),
        "P_NAID" NUMBER(20,0),
        "REL_TYPE"    VARCHAR2(25 BYTE),
        "XML_DATA" "SYS"."XMLTYPE"
    CREATE
    MATERIALIZED VIEW person_mv
    AS
    SELECT  p.naid
          , p.auth_type
          , INSERTCHILDXML
              p.xml_data                 -- Parent XML Column
            , '//*[contains(local-name(), ''person'')]' --XPATH to Person
            , 'nonPreferredHeadingArray'                -- Value for new child element
            (                                                       -- Sub query for injecting new variant person array
              SELECT XMLELEMENT
                "nonPreferredHeadingArray"
              , XMLAGG -- Aggregator for Variant Persons Array
                  XMLELEMENT
                    "variantPersonName"                    -- Wrapper for each entry in array
                  , extract(a.xml_data,'*/*')
              FROM auth_assc_table -- Link table
              WHERE a.p_naid = p.naid
          ) AS XML_DATA
    FROM authority p -- Parent table
    WHERE p.auth_type = 'Person';The views are created fine and they work perfectly for what we need. The problem is the refresh when we edit the base tables. Ideally, it should take a couple seconds. Right now, it takes a couple minutes. XMLTYPE is one problem and the Complex Query exception is the other. If there is a work-around for fast refresh, please let me know. Greatly appreciated.

    jjmdb wrote:
    I'm trying to create a fast refresh materialized view that uses a column of xmltype. The problem is I cannot create an MV log that accounts for the xmltype column. I tried excluding it and got the above error. Is there another way I can incrementally update a materialized view where I don't have to do a COMPLETE refresh or use FAST refresh? Besides XMLTYPE column, your MV definition has a subquery which prevents it from being fast refreshable.
    I could not find any specific reference in documentation about restriction on XMLTYPE (or CLOB) columns but it seems logical that oracle will not be able to keep track of changes to binary data. What does DBMS_MVIEW.EXPLAIN_MVIEW generate for your MV definition? That should tell you which all conditions (for FAST REFRESH) your MV violates. Since you can not create a MV LOG to include XMLTYPE column, it will not be possible to create a FAST REFRESHABLE MV that includes the XMLTYPE column.
    I am afraid there is not much you can do here unless you are prepared to change the way data is stored in your base tables. If you can store data in base tables using standard data types instead of binary/XML storage, you might be able to create a FAST REFRESHABLE MV.

  • Error on creation of Materialized view

    Hi all, how are u? :-D
    Well, I´m trying to use MATERIALIZED VIEW with refresh fast,
    when first I grant permissions on the table action to an user,
    after I create the MATERIALIZED VIEW LOG on the master and, finally,
    I create the MATERIALIZED VIEW on the target.
    -- using other_user:
    GRANT SELECT, INSERT, UPDATE, DELETE ON action TO an_user;
    CREATE MATERIALIZED VIEW LOG ON action
       WITH PRIMARY KEY;
    -- using an_user:
    CREATE MATERIALIZED VIEW vw_action
    REFRESH FAST
    START WITH sysdate
    NEXT TRUNC(sysdate) + 1/24
    AS SELECT * FROM other_user.action;But, when I perform the CREATE MATERIALIZED VIEW the following error occurs:
    ERROR at line 5:
    ORA-12018: following error encountered during code generation for "AN_USER"."VW_ACTION"
    ORA-00942: table or view does not exist
    When I execute the query SELECT * FROM other_user.action, the data are returned.
    What can it to be?
    What´s the problem in this case?
    Thank you very much!
    []´s

    Hi Nicolas,
    Well, I´m using Oracle 9.2.0.1 with Linux Red Hat.
    I tryid without synonym and with synonym too, but...
    I´m gonna to search for a solution.
    And I´m gonna to try use the action recommended by oracle:
    ORA-12015 cannot create a fast refresh materialized view from a complex query
    Cause: Neither ROWIDs nor primary key constraints are supported for complex queries.
    Action: Reissue the command with the REFRESH FORCE or REFRESH COMPLETE option or create a simple materialized view.thank you very much!
    []´s

  • Creation of Materialized View is taking Long Time

    Hi All,
    In the execution of PLSQL script, I am executing the following sequence.
    First step I am creating the materialized view A, and Materialized view B using DB Links. In the same script as a part of second step I am creating one more materialized view with the combination of Materialized view A and Materialized view B and a table with DB links. But creating of this materialized view is taking 15 hours, I am using Refresh is COMPLETE. I am using a separate tablespace for this and it is Auto Extend Clause. Can any body tell me or suggest where exactly I had done the mistake.
    Thanks,

    pujakhetan wrote:
    is this posiible to do fast refresh on above mentioned Materialized view ??
    I dont have much information about restriction which exists for materialized view refresh .then consider to actually Read The Fine Manuals found at http://docs.oracle.com to obtain desired details

  • Creation of materialized view

    Hi All,
    We had created some other materialized view with for small set of data. The materialized view name is ‘XXCA_PAGL_RECON_GL1_TRANS_MV’ and it has created a table with the same name.
    What I am unable to understand is that the new table which was created by the system during the creation of materialized view is in VALID state but the materialized view is in INVALID state.
    Please help me to understand this process.
    Thanks in advance
    Venkatesh

    The column dba_objects.status for mviews is set to INVALID when the base tables are updated. See Metalink note 454552.1. It is normal.
    Edited by: YasinBaskan on Feb 17, 2009 2:07 PM

  • Replication of database views/materialized views from big oracle to mobile client

    Hi all,
    Has anyone done a replication of a view or a materialized view
    from big oracle to oracle lite? I can get replication of a
    database table happening(although I cant seem to find the table
    when I log into the odb using msql) but it just doesn't seem to
    work with views(hence the path I have taken which is to use
    materialized views). Anyone? Cheers

    Hello,
    Yesterday I met the same problem and very sad about this, however, my story is much more complicated (I think so).
    I have 6 databases:
    2 - 11g
    2 - 10g
    2 - 9i
    Every database of each release has different characterset(UTF8 and AL16UTF16).
    I am trying to create Materialized view with FAST REFRESH on Oracle 11g, when master tables are located on 10g database and 9i database.
    Materialized view, which points to 9i database, was successfully created.
    Materialized view, which points to 10g database, gets ORA-12028
    Like you, I tried many notes from METALINK and thought at the begining that the problem is my characterset. But, when the materialized views were successfully built on Oracle 9i database, I understood that the problem is something else.
    Did you find the actual reason why this issue does not work??
    Thanks,
    Alex

  • ORA-12015:  cannot create a fast refresh materialized view from a complex q

    Hi,
    I'm facing very strange problem. Please help me why this error is coming
    I'm creating a simple materialized view, but it is giving below error since this is simple select * from.
    CREATE MATERIALIZED VIEW EFMS.MS_TASK
    BUILD IMMEDIATE
    REFRESH FAST
    START WITH SYSDATE
    NEXT (SYSDATE + 1/24)
    WITH ROWID
    AS
    SELECT * FROM MS_TASK@efms_link;
    SELECT * FROM MS_TASK@efms_link
    ERROR at line 8:
    ORA-12015: cannot create a fast refresh materialized view from a complex query
    CREATE MATERIALIZED VIEW LOG ON MSDBO.MS_TASK
    TABLESPACE DBOR_MVLOG
    PCTUSED 0
    PCTFREE 60
    INITRANS 20
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOCACHE
    NOLOGGING
    PARALLEL ( DEGREE 2 INSTANCES 1 )
    WITH ROWID, PRIMARY KEY
    EXCLUDING NEW VALUES;


    Not is a best practice to use 'select *'

    ORA-12015: cannot create a fast refresh materialized view from a complex query
    Cause:      Neither ROWIDs and nor primary key constraints are supported for complex queries.
    Action:      Reissue the command with the REFRESH FORCE or REFRESH COMPLETE option or create a simple materialized view.
    Then you have to change REFRESH FAST or create a primary key in MS_TASK@efms_link to avility fast refresh.
    . :-) any help with my english is wellcome :-) .

  • ORA-12015: cannot create a fast refresh materialized view from a complex

    Hi All,
    I am trying to create materialized view but i got a error ORA-12015: cannot create a fast refresh materialized view from a complex query.
    Regards,
    narayana

    Hi,
    Please see if (Note: 179466.1 - Diagnosing ORA-12015 fast refresh materialized view / complex queries) helps.
    Regards,
    Hussein

  • Create materialized view from Designer9i

    Is there a way to create a materialized view from Oracle Designer 9i that will that have a header that look like this :
    CREATE MATERIALIZED VIEW XXXXXXXXX
    REFRESH COMPLETE ON DEMAND WITH PRIMARY KEY
    Instead of this :
    CREATE MATERIALIZED VIEW XXXXXXXXX
    REFRESHWITH ROWID
    Thanks
    Jérôme

    yes.
    as long as you have the privilege.
    but be careful, it may causing locking issue in the SQL Server side.

  • Materialized view from prebuilt table doesn't work with spatial types?

    Hello, I'm trying to build a materialized view of a table using the prebuilt option and a pre-built table.
    Oracle gives me an ORA-32304 error, saying it can't do this with user-defined types. The original table has no user-defined types, but does use an sdo_geometry column. Is this what it's complaining about?
    Now I can sort of understand this, but here's my real problem: the materialized view I'm creating is comprised of a subset of the columns from the original table, but not the geometry column. Is Oracle right in refusing my prebuilt request? Does anyone know of a way around this (besides creating the MV from scratch without prebuilt).
    I've successfully created an MV on another table, which doesn't have a spatial column, using the prebuilt option and a subset of columns.
    (I'm using Oracle 11.2.0.2.0 on both master and slave databases)

    Good news, everyone! =)
    SAPwebIDE team fixed this issue with MMD template in SAPwebIDE v1.10.2. available on http://hanatrial.ondemand.com.
    This "Bug" or "Feature" was presented in 1.8.x and 1.9.x SAPwebIDE (i've used local installation) and now it's gone in v1.10.2. Thank you, SAPwebIDE Team! =)
    The difference between versions of MMD template is only in one file (fixed one is on the right):
    Master2.controller.js
    And here it is:
    Now, only one question remains: HOWTO:SAPUI5 Fiori-like report. (mix control's value as key into binding context)
    Best regards, ilia.

  • How to prevent materialized views from refreshing if source table is zero

    any ideas?

    Probably not what you were hoping for but here are a couple of ideas.
    Your account shows - 113 (85 unresolved)
    1. How about helping to keep the forum clean by reviewing your 85 unresolved previous questions and giving HELPFUL or ANSWERED credit to those that helped you in the past.
    2. Read the FAQ at the top right of the page and post the information about your system and software so that we know what you are working with.
    3. Ask your question in the body of the thread. Don't just say 'Any ideas'.
    What exactly is your question? Is this an academic question or do you have an actual problem that needs to be addressed?
    If you have an actual problem produce the DDL for the materialized view and information about the type of refresh that has been set up for it. Is there a materialized view log on the base table(s)?
    The simple answer to your quest is to use REFRESH ON DEMAND and check the base table(s) before you do a manual
    refresh. The best answer depends on what version of Oracle you are using and what your actual setup is. Are your
    MVs in REFRESH GROUPS?. That can make a difference in the answer.
    How can anyone help with this question if you won't provide the information needed(FAQ)? Why SHOULD anyone help if you show you don't appreciate the help by marking questions answered once you have been helped.

  • Create materialized view in SE referring table in EE

    Hi DBAs,
    I am trying to create a Materialized view on Oracle 10g Standard Edition which is installed on Linux Debian Lenny.
    The master table is on Oracle 10g Enterprise Edition installed on Red Hat Linux 4.1.2.
    When I run,
    create materialized view t1 build immediate refresh fast as (select * from aksharaemsmigrated.t1@db102)
    i get,
    ORA-12028: materialized view type is not supported by master site
    When I run,
    create materialized view t1 build immediate refresh fast on commit as (select * from aksharaemsmigrated.t1@db102);
    I get,
    ORA-01031: insufficient privileges
    When I run,
    select * from aksharaemsmigrated.t1@db102
    I get,
    the rows from aksharaemsmigrated.t1@db102
    NOTE: 'db102' is remote DB on 10g EE for which I created db link.
    I am able to create Mview for local table.
    Is this not supported? I mean creating Mview on Oracle SE referring base table from Oracle EE.
    I have to give solution soon. Can you please throw some light.
    Regards,
    Vijay

    Don't put select statement inside parantheses.
    Test these
    create table x1 as select * from aksharaemsmigrated.t1@db102;
    create materialized view t1 build immediate refresh fast as select * from aksharaemsmigrated.t1@db102 ;Note that you cannot create an MV that is REFRESH ON COMMIT when across Databases.
    See my explanation at http://hemantoracledba.blogspot.com/2008/06/mvs-with-refresh-on-commit-cannot-be.html
    Hemant K Chitale

  • Long time for creation of materialized view

    Hi,
    we are trying to create a materialized view and this view would contain 1 lakh records and around 50 columns.
    The select statement to get these records takes only 1-2 sec whereas the actual creation of view takes 17 minutes. The database used is Oracle 8i. The code used is
    CREATE MATERIALIZED VIEW employee_master_t
    PCTFREE 10
    STORAGE (initial 500k next 500k pctincrease 0)
    REFRESH WITH ROWID COMPLETE START WITH SYSDATE
    NEXT SYSDATE + 1 AS select * from table_name
    Is it because the insert is slow and temp tablespace may have to be increased?
    also, can anyone pls suggest if fast refresh mode can be used with Oracle 8i since currently we are not able to create as error saying that query is complex is returned

    It will be possible to create a Materialised view with up to 20 tables, but you have to understand the restrictions on complex Materialised views with regards to fast refresh.
    To help your understanding, refer to Materialized View Concepts and Architecture
    <br>
    Oracle Database FAQs
    </br>

  • Create View from Database Links - Question

    Question
    I'm missing something simple.
    I'm trying to create a view, from a Database Link.
    CREATE VIEW view_name
    AS SELECT a.*
    FROM schema.tablename@dblink a;
    When I run this in the SQL Commands window.
    I get this error message.
    ORA-00933: SQL command not properly ended
    What am I missing? Any help is appreciated...

    <i>CREATE VIEW vw_name
    AS SELECT a.*
    FROM [email protected] a;
    </i>
    <br>
    1) User (schema) which is creating view must have proper db_link to source database. For that try this for testing purpose:
    select 1 from [email protected]<br>
    If this fail then db_link is not ok! This step is absolute must to go any further step to!!!
    <br>
    2) when db_link is set, then your view should be named as:
    CREATE VIEW vw_name
    AS SELECT *
    FROM <b>schema_name</b>.[email protected];<br>
    please pay attention to "schema_name", because from remote side every table is in some schema so it really need declaration of owner schema.
    <br>
    Hope this helps...

Maybe you are looking for

  • Java.lang.NullPointerException when capture schema

    When I try to capture schema from MySQL (WIN) to Oracle 10G R2 (unix), I have a exeption error: java.lang.NullPointerException The tables are captured in the repository but columns and others objects don't. The last line in the java log is: unnable.r

  • .jpx files are not being created..

    Hello Folks, I have a Workspace, which is a typical Web component workspace, its a Struts based ADF application. Apart from that Workspace, I also have a Jdeveloper Project on which I have got Utility class files. I attach this Project to the Workspa

  • Trouble syncing my new ipod

    Everytime I try to sync my new and old ipod I get the following error message: Attempting to copy to the disk "NANO" falied. You do not have enough access privileges for this operation. iTunes could not save to your music folder because you do not ha

  • [asr9k cluster upgrade procedure]

    Dear CSC (and hopefully Xander): What is the proper way of upgrading an asr9k cluster? Do i have to break the cluster and upgrade both 9ks separately? then rebuild the cluster? Or you just treat the cluster as one box and when you upgrade one of them

  • Netflow on cisco me 6523

    hello im trying to get netflow working on a me 6523 to a destination address using udp port 4739 but im not getting anything through wire shark while connected to a span port on the router or the connecting switch. Im using the management interface w