Materialized View - 9i and 10g

Hello,
I have some questions:
1. What are the differences in Materialized View between Oracle 9i and 10g?
2. It is said that in 9i, Materialized View does not support self join, is it true? Does 10g has this restriction?
3. It is said that in 10g, the select list cannot have subquery, is it true? Does 9i has this restriction?
Thanks,

1. Is a docs question: http://tahiti.oracle.com
2. Is a docs question: http://tahiti.oracle.com
3. Is a docs question: http://tahiti.oracle.com
Why do you find it easier to ask someone else to read the docs for you than to read them yourself?

Similar Messages

  • Materialized view (creating and complete refresh)

    Good day.
    I have a huge query that is used to create a materialized view. The query consist of 9 joins, a lot of aggregations, some subqueries, so we can say it is rather huge. The query itself executes for about 30 seconds and returns about 200 rows. The materialized view creates and refreshes for more than 30 minutes. Can someone please explain me the mechanism of materialized view creation which causes such bad performance.
    We use Oracle Database 9.2.0.4.
    Thank you in advance.

    I've fount the solution. May be it will be useful for someone not regarding that 9.2 database is less used today than 10.2.
    I studied carefully the plan of the query and the plan of insert statement that is used when creating materialized view and found the cause of trouble. Insert statements generates VIEW PUSHED PREDICATE and BITMAP CONVERSION FROM ROWIDS when parsing. Bitmap conversion can be removed by setting environment parameter btree_bitmap_plans to false (a well-known issue), but I decided not ot change the production environment. The pushed predicate can be removed by using hint NO_PUSH_PRED to each subquery used in a materialized view. This step reduced the time of materialized view creation and execution to about a minute.
    Thank everyone who tried to help.

  • How manage materialized view, materialized view logs and db links in Server explorer and Oracle Database Proyect

    Hi,
    We have installed Oracle 12c Oracle Developer Tools for Visual Studio (Visual Studio is 2010 edition). With this tool we can manage tables, views, etc... but we also need to manage more database objects such as materialized views, materialized view logs and db links.
    Is there any option to manage this object from Server Explorer and to add the script in the Database Project? At the same time, the schema compare tools does not include this object types. Is there any option to compare them?
    Thanks.

    As you noticed, not all database objects are available in Server Explorer, and because of this they can't have scripts generated for them, nor can they be compared with Schema Compare.
    In a pinch, you should be able to use SQL Developer to do this.

  • 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!

  • What's the impact of rowid materialized view in oracle 10g

    Hello to all ;
    Oracle official  docs  saying
    ROWID materialized views should be used only for materialized views based on master tables from an Oracle7 database, and should not be used from Oracle8 or higher.
    For 10g or higher versions can we consider rowid materizlized view ?
    product 10.2.0.4 and 11g r2 on Redhat 5.1

    No
    should not be used from Oracle8 or higher10g is higher

  • Materialized View - Refresh in 10g FAST .. refresh in 11g SLOW

    Sorry I'm not able to paste anything.
    The customer moved their database from 10g to a 11gR2 database.
    They created the MV in the new system and now it takes 26 hours to refresh
    as opposed to 15 min in the old 10g database.
    Just looking for a game plan for troubleshooting.
    I know I'm not providing much of anything so please forgive me.
    Where would you look first ? Explain plan .. system settings .. ? Let me know.
    If you have a good reference then that would work. The docs are not working.
    Thanks in advance.
    BB

    Do you mean they upgraded their existing database from 10g to 11gr2?
    Or do you mean they loaded the data into a new 11gr2 database?Yeah I confirmed this morning that they data-pumped the entire database to the 11g host.
    Unless you provide more information there is no way to provide any specific suggestions.
    What kind of MV? Are the source and MV on the same server?They do a manual refresh :
    create materialized view (mview_name as select ...)
    dbms_snapshot.refresh(mview_name, 'C')
    The source is the same for both however it is from a place that uses a connection.
    If it is a new DB then there may be missing indexes or constraints.
    The MV may initially be empty and the first refresh will be a COMPLETE
    one that will take a lot longer than an incremental.
    Some of the objects or constraints could be invalid. The indexes appear to be the same and the constraints enabled/disabled in the same manner.
    They confirmed that the refresh after the initial is taking way too long compared to before (10g).
    Oddly some of the mviews see no performance degradation in the new environment.
    They have many.
    Thanks for taking the time to think about it. It was much appreciated.
    If I get to the bottom of it I'll let everybody know.
    BB

  • Exporting data from a materialized view in Oracle 10g

    Can anybody tell me how to export data to a remote server and import data in that remote server without using ftp utility. Actually I want to export the data from a materialized view to the remote server and import the same in the remote server.
    If everything works well, I'll put the exporting and importing in a cronjob.
    Please let me know how can I do that if that's possible .
    Any reply would be appreciated.
    Thanks.

    Here is what I'm trying to do.
    I created materialized views using multiple base tables in my local server and the base tables got populated using a long process.
    Now I want to copy those data alone to some remote server since it doesn't have any base tables in it. For now, the remote server should depends on the localserver's data. I'm going to use the remote server's data for some testing purposes.
    I know it is easy to create mat.views in the remote server but it doesn't have I don't want to do that now. I just want to copy the snapshots from my local server to the remote server.
    Please let me know how to do that.
    Thanks.

  • 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!

  • Materialized view - parameter and refresh

    Hi,
    We are creating a Materialized view that has 2 rows for a CCID, one for this year and one for previous year with balances in 12 buckets.
    We have 2 questions:
    1. Can a materialized view be created with a parameter? or it can only take hard coded values?
    2. Can we refresh a part of materialized view, lets say we want to refresh the balances only for this year?
    Thanks

    user12182208 wrote:
    Hi,
    We are creating a Materialized view that has 2 rows for a CCID, one for this year and one for previous year with balances in 12 buckets.
    We have 2 questions:
    1. Can a materialized view be created with a parameter? or it can only take hard coded values? Typically, you want a materialized view to contain a complete set of aggregate data ... so, no, parameters don't really make sense (also, the results are pre-computed unlike a regular VIEW which is just a stored query. With a MV the data is actually computed on creation unless you defer it, and takes up physical storage).
    >
    2. Can we refresh a part of materialized view, lets say we want to refresh the balances only for this year?
    You can (depending on your Oracle Version and complexity of your materialized view) create a materialized view that does fast refreshes. If for some reason it was pertinent for you to achieve what you've asked, you could make 2 MV's and then a view that does a UNION ALL of them (the MV's would not contain overlaps), then you would just refresh the 1 MV, seems odd to me to want to do this though.
    Thanks

  • Materialized View big and empty after full refresh

    Background:
    Database 10.2.0.4 running on Windows 2003 Server R2 SP2.
    Materialized view MV_A, selects from 3 base tables, 2 of which are partitioned, fast refresh on demand, approx 33 million rows. Initially populated with a complete refresh of 31 million rows about 2 months ago, and fast refreshed every 10 seconds since then.
    Problem: Performed a partition split on one of the base tables and received this error on the next fast refresh:
    ORA-32313: REFRESH FAST of "CUR"."MV_A" unsupported after PMOPs
    Docs say a complete refresh is required.
    So, created a new copy of the materialized view "MV_B", same storage params, same mview SELECT, same schema.
    Did a complete refresh, the extents grew to the expected 10GB combined size. The DBMS_MVIEW.REFRESH reported 'PL/SQL procedure successfully completed' but the MVIEW is empty.
    23:01:26 SQL> exec DBMS_MVIEW.REFRESH('MV_B','C','',FALSE,FALSE,0,0,0,TRUE) /* Complete */;
    PL/SQL procedure successfully completed.
    07:56:46 SQL> commit;
    Commit complete.
    08:17:51 SQL> select count(*) from mv_b;
    COUNT(*)
    0
    08:19:39 SQL>
    Since the MVIEW table MV_B added 10 GB worth of extents during the refresh, it appears that the rows were inserted but then for some reason were rolled back. Nothing unusual in the alert.log. If I execute the MVIEW select statement by itself in SQLPlus, yes, I do get rows back.
    The tablespaces housing the MVIEW table as well as the temporary and undo tablespaces are set to autoextend/unlimited to make sure they are not an issue.
    Next I dropped and recreated the materialized view MV_B, identical except an added condition to the WHERE clause so that the number of rows returned is only 7 million instead of 33 million and that works fine - a complete refresh populates it and subsequent fast refreshes work correctly.
    I'm stumped. Any ideas? Could we be running out of some memory resource that when exhausted, is not trapped properly by Oracle as an error?
    - Tom

    Is the MV and the source tables on the same database? If this is a remote MV, then check the source site if there are any issues (TEMP, UNDO space issues).

  • Materialized View - creation and schedule (To automate Refresh)

    Hi All,
    I have one table based on SQL Query (multiple tables) and loading data every day through procedure.
    When I execute the procedure is taking lot of time to load data. That’s why I am planning to create Materialized view to refresh the data in a table every day at some point of time (ex:-9.00 am).
    Exclude procedure and materialized view are there any ways to refresh the data?
    Can you and all please help me to create materialized view and schedule (Automate refresh).
    begin
    insert into CLAIMS_PRODUCT_TAB
    select
    substr(at.ATN_VOUCHER_NUMBER,1,6) as BRANCH,
    t.MONTH_NAME as MONTH,t.FISCAL_YEAR as YEAR,
    bb.ACC_ACCOUNT_TYPE as TYPE,
    aa.ACC_DEPARTMENT_CODE as DEPT,
    pr.PRODUCT_NAME as PRODUCT,
    case bb.ACC_ACCOUNT_TYPE when '1301' then 'Claims Paid' when '5383' then 'Claims OS' end as HEAD,
    case aa.ACC_DEPARTMENT_CODE when '31' then 'OD' when '32' then 'TP' when '39' then 'TP Pool' end as DEPT_NAME,
    count(distinct at.CLAIM_ID) as CLAIMS,
    --count( distinct at.POLICY_ID) as POLICIES,  
    sum(atd.ATD_CREDIT_AMOUNT - atd.ATD_DEBIT_AMOUNT) as totals
    from
    ACCOUNTING_TRN_DETAIL atd,time t,
    ACCOUNT bb,
    ACCOUNT aa,claim c, policy p,product pr,
    accounting_transaction at
    where bb.ACC_ACCOUNT_ID = aa.ACC_ACC_ACCOUNT_ID
    and at.CLAIM_ID = c.CLAIM_ID
    and c.POLICY_ID = p.POLICY_ID
    and p.PRODUCT_ID = pr.PRODUCT_ID
    and aa.ACC_ACCOUNT_ID = atd.ACC_ACCOUNT_ID
    and atd.ATN_ACCOUNTING_TRANSACTION_ID = at.ATN_ACCOUNTING_TRANSACTION_ID
    and trunc(at.ATN_TRANSACTION_DATE) = t.CAL_DATE
    and (bb.ACC_ACCOUNT_TYPE in ('1301','5383'))
    group by substr(at.ATN_VOUCHER_NUMBER,1,6)
    ,t.MONTH_NAME
    ,t.FISCAL_YEAR,bb.ACC_ACCOUNT_TYPE
    ,aa.ACC_DEPARTMENT_CODE
    ,pr.PRODUCT_NAME
    , case bb.ACC_ACCOUNT_TYPE when '1301' then 'Claims Paid' when '5383' then 'Claims OS' end
    ,case aa.ACC_DEPARTMENT_CODE when '31' then 'OD' when '32' then 'TP' when '39' then 'TP Pool' end );
    end;
    Thanks and Regards
    Venkat

    Is the MV and the source tables on the same database? If this is a remote MV, then check the source site if there are any issues (TEMP, UNDO space issues).

  • Materialized view refresh and rollback segment

    Hi all,
    maybe this is a dumb question but:
    We use a few materialized views (partitioned, on prebult tables) in our DB.
    The refresh method used is complete.
    Every refresh clears old data et the very beginning and leaves the table empty until new data is commited (can take up to 2 hrs). But what is use of specifying the rollback segment than?
    I would like to change this behaviour to keep the old data to the very moment of replacing with new one.
    Is there a way?
    Thanks a lot
    Petr

    Hi all,
    maybe this is a dumb question but:
    We use a few materialized views (partitioned, on prebult tables) in our DB.
    The refresh method used is complete.
    Every refresh clears old data et the very beginning and leaves the table empty until new data is commited (can take up to 2 hrs). But what is use of specifying the rollback segment than?
    I would like to change this behaviour to keep the old data to the very moment of replacing with new one.
    Is there a way?
    Thanks a lot
    Petr Oracle will truncate the MV and then effectively insert as select to populate your MV. In doing so
    Oracle needs to keep a read consistent view of the select it is executing. Here clearly you might consider specifying a specific rbs.
    Have you considered fast refresh or is this not a candidate? At least with fast refresh you won't have to compeletly rebuild the mv each time and it will be considerably faster.
    steve

  • Materialized View Refresh and I_SNAP$ Indexes issue

    At the time of doing REFRESH of the Materialized View, we are getting error like -
    SQL> EXECUTE DBMS_MVIEW.REFRESH('MV_TEST.MY_VIEW,'CF');
    BEGIN DBMS_MVIEW.REFRESH('MV_TEST.MY_VIEW,'CF'); END;
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-00001: unique constraint (MV_TEST.I_SNAP$_FIN_RESULT_EXPENSE1) violated
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2545
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2751
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2720
    ORA-06512: at line 1
    I tried to drop and recreate the index I_SNAP$_FIN_RESULT_EXPENSE1 but it didn’t helped.
    Later I dropped the index I_SNAP$_FIN_RESULT_EXPENSE1 and refreshed the materialized view and it was successful (obvious). But when I tried to recreate the index, I got the following error –
    SYS_OP_MAP_NONNULL("FIN_MULT"), SYS_OP_MAP_NONNULL("FIN_CD"))
    ERROR at line 8:
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    When I look at the value of SYS_OP_MAP_NONNULL('FIN_CD'), it seems to be unique.
    SQL> select SYS_OP_MAP_NONNULL('FIN_CD') from dual;
    SYS_OP_MAP_NONNULL('FIN_CD’)
    46494E5F5650545F4C564C5F335F434400
    My questions are:
    1.     Why are the indexes (I_SNAP$_*) automatically created for?
    2.     What is the purpose of these (I_SNAP$_*) indexes?
    3.     What harm can be there if we drop these (I_SNAP$_*) indexes?
    4.     Why it is complaining about the Duplicate records / Uniqueness?
    5.     How to know where exactly the problem is in this case?
    6.     What is the solution for this problem? How to recreate these indexes successfully?
    Thanks!

    This forum is for the OLAP Option (which supports a cool featured called cube-organized materialized views). If this question if about table-based materialized views you should post it the General Oracle Database forum. Good luck.

  • Materialized Views appear twice - under MV and under tables

    Hi,
    I've encountered a wierd issue.
    It seems that every materialized view is also appearing under the tables tab.
    For example sh.cal_month_sales_mv. Another example, run this as sh:
    CREATE MATERIALIZED VIEW SH.OFIR_MV
    REFRESH FORCE ON DEMAND
    ENABLE QUERY REWRITE
    AS SELECT sum(s.amount_sold) AS dollars
    FROM sales s;
    You'll see a table OFIR_MV under the table tab. If you try to drop it(right-click-> table-> drop), you get ora-12083 must use DROP MATERIALIZED VIEW to drop "SH"."OFIR_MV"
    Also, SQL tab of the "table" has the folowing remark
    -- DBMS_METADATA was unable to use TABLE_EXPORT to generate sql. Now trying to use TABLE
    I guess this is the source of the issue:
    select object_name,object_type from user_objects where object_name = 'OFIR_MV';
    OBJECT_NAME OBJECT_TYPE
    OFIR_MV TABLE
    OFIR_MV MATERIALIZED VIEW
    2 rows selected
    So, creating a MV also adds a table to user_objects/tables. (Huh? that suprised me)
    Could SQL Dev filter these fake tables or at least have a different icon/color for them?
    Thanks.
    Ofir
    BTW - Win XP, 10.2.0.3EE, SQL Dev 1.1.1.25.14

    e.g Re: Materialized Views, indexes and Raptor Eeerrr... no.
    That user wanted to be able to access indexes, etc., which he thought could be easily accomplished by adding the MV to the tables node.
    To what the response was: the options on the MV will be improved (which it has), NOT bringing it in the tables node. As Ofir also pointed out, there's a reason for it not belonging there: the operations performed on the objects of the table node expect tables, not MVs.
    So, between fixing the tables node for accepting MVs and it's operations, and just removing the MVs from the node, I'd go for the second, faster, more correct solution.
    K.

  • Why materialized view taking hours and yet not created

    hi,
    i am trying to create the following MV
    create materialized view MV1
    force on demand
    start with date 1 next date2
    AS
    select query 1--> complex query that return approcimately 2 millions rows
    union all
    select query2 --> complex query that returns 300K rowsit has been taking hours i.e > 4 hrs and still unable to create the MV
    w/o the create materialized view statement i am able to return the results from the union of the 2 queries
    what might be the possibility ?
    tks & rdgs

    Issue could be due to the complexity of your query..Even i faced the same issue when i worked on materialized views.It was taking too long to create materialized view and then we splitted the query and created two materialized views.
    Finally created a View for those MV's.You can also try the same
    Materialized View Log
    When you create a materialized view using the FAST option you will need to create a view log on the base tables.A fast refresh uses materialized view logs to update only the rows that have changed since the last refresh.
    When DML changes are made to the master table's data, Oracle stores rows describing those changes in the materialized view log and then uses the materialized view log to refresh materialized views based on the base table. This process is called an incremental or fast refresh.Without a materialized view log, Oracle must reexecute the materialized view query to refresh the materialized view. This process is called a complete refresh.Usually, a fast refresh takes less time than a complete refresh.
    You can go through the below link
    http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96567/repmview.htm
    Thanks
    Suni

Maybe you are looking for

  • "No Sim" Message anyone?

    My iphone 3g has been working fine, until a few minutes ago when I got a No Sim message? anyone know what needs to be done? I turned off and turned the phone back on, no result...Synched again, No result. Not sure what else to do.

  • Where does iTunes get CD information?

    When you put a CD into your computer and iTunes detects it, where does it pull the artist, album, and track information? Is it the internet or on the CD itself?

  • Jdeveloper and Oracle 8.1.6

    which Jdeveloper version will work with Oracle 8.1.6 and when it will be available? Jdeveoper 3.0 only work with Oracle 8.1.5.

  • The music stopped and all the pictures were scrambled lines all the graphic

    hi all, Happy New Year can you tell me if anyone else has this happen to them, is it a known fault or should i return back to store to get it replaced? thanks for any help or advice The music stopped and all the pictures were scrambled lines all the

  • Lost all sound in web browsers

    Where do I begin to fix this? I still get system sounds, email sounds, etc. But nothing out of any of my web browsers.