Materialized Views created using ROLLUP

Not sure if this one is best posted to a general Oracle forum, or even to the Discoverer Forum, but it's more to do with Data Warehousing so here goes...
1. If I create a materialized view, either with or without OWB, do I also need to separately create indexes on the materialized view?
2. If I create them using GROUP BY and ROLLUP (to create summaries that calculate all the subtotals along all hierarchies and dimensions), would any subsequent query have to use GROUP BY and ROLLUP to qualify for query rewrite?
3. If I create them using GROUP BY and ROLLUP, would the queries generated by Discoverer ever get rewritten, as I assume they would not use GROUP BY and ROLLUP as these were not features found in earlier versions of Oracle?
Any advice gratefully received.
Mark

Thanks for replying, Igor.
Just to clarify:
1. Do MV's created without fash refresh capabilities still get indexes created automatically? If not, should you manually create them in this instance?
2. Can you confirm that, if a MV gets created using GROUP BY and ROLLUP (to potentially calculate all dimension intersections in one go), users queries to the base fact table do not have to use ROLLUP in their GROUP BY clause - they will still get rewritten ok?
3. You mentioned that Discoverer generates queries using GROUP BY - does it ever use GROUP BY ROLLUP if it knows it's working on an Oracle 9i platform?
I guess where i'm coming from, is that we're considering using the OLAP Summary Manager within OEM to create materialized views, rather than the normal summary adviser, as this creates MV's designed to hold (R)OLAP cubes (as detailed at http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96520/mv.htm#574241). I wouldn't however want to use these if user's queries had to specify ROLLUP in their GROUP by clause to qualify for query rewrite.
Getting back to OWB, are there any plans to improve the support for importing, designing and refreshing materialized views in the Paris release of OWB? Summary management is perhaps a bit of a weak spot in OWB, and it'd be good if Hierarchical Cube Materialized Views - which are an excellent new feature in 9i - were supported in future releases.
best regards
Mark Rittman

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.

  • Can Oracle materialized view be used as crystal report datasource

    Hi,
    Can we use materialized view created in Orace 10g database as the data source of crystal reports.
    I'm using Crystal reports Server 2008 V1 version. I'm unable to find the materialized view under my data connection. I can see only tables, static views and stored procedures.
    Is there a way by which I can run my reports against a materialized view created in Oracle.
    Thanks
    Thomas EL

    Hi Thomas,
    Rather than doing all of this work around to access multiple databases/servers why not create a stored procedure to do all of this for you? Search the notes area for samples on how/what CR requires to use a SP in Oracle.
    Advantages is this is done all server side and CR simply waits for the data to be returned. Even if you are using a BVM or connecting directly to the SP, both cases are server side. Database servers are much more efficient and optimized to run queries and filtering data. CR has to do the filtering on it's second pass and that causes performance delays.
    Thank you
    Don

  • Offline Instantiation of a Materialized View Site Using Export/Import

    Has anyone had any success performing offline instantiation of a materialized view site using export/import in Oracle9?

    This is what I wanted to ask in the forum. I want to use datapump for the initial instantiation because I believe that indexes (the actual indextables, not just the definition) are also replicated using datapump.
    So, is it possible to do the instantiation using datapump?

  • Error while creating materialized view which using database link

    Helo!
    I'm getting error "ORA-00942: table or view does not exist" when I want to create materialized view.
    Details:
    1. On destination database I create a database link:
    CREATE DATABASE LINK SDATABASE
    CONNECT TO MYUSER
    IDENTIFIED BY MYUSERPASS
    USING 'ORCL';
    => Command "SELECT * FROM TABLE1@SDATABASE" returns data normally!
    2. On source database I create MATERIALIZED VIEW LOG:
    CREATE MATERIALIZED VIEW LOG
    ON TABLE1
    WITH PRIMARY KEY
    INCLUDING NEW VALUES;
    3. Now, when I want to create MATERIALIZED VIEW on destination database:
    CREATE MATERIALIZED VIEW TABLE1
    REFRESH FAST
    START WITH SYSDATE
    NEXT SYSDATE + 1/1440
    WITH PRIMARY KEY
    AS SELECT * FROM TABLE1@SDATABASE;
    ...I get error "ORA-00942: table or view does not exist"!
    How is that possible if command "SELECT * FROM TABLE1@SDATABASE" returns data normally?
    Thanks,
    Voranc

    And, I'm using Oracle 10g.
    Voranc

  • Error creating materialized view log using DBlink

    Hi guys,
    I have 2 databases in diferent machines . (machine A and B)
    Machine A is my production database and I have a database link in machine B accessing Machine A
    CREATE MATERIALIZED VIEW vm_test
    BUILD IMMEDIATE
    REFRESH FAST ON commit as
    select * from test@A
    -- no problem in this first operation the materialized view was created sucessfully
    Now I need to create the LOG
    SQL> CREATE MATERIALIZED VIEW LOG ON test
    2 PCTFREE 5
    3 TABLESPACE prodemge_2006
    4 STORAGE (INITIAL 10K NEXT 10K);
    CREATE MATERIALIZED VIEW LOG ON test
    ERROR at line 1:
    ORA-02050: transaction 5.21.8771 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from A
    ORA-03113: end-of-file on communication channel
    What could be causing this error ?
    Thank you,
    Felipe

    ORA-02050 transaction string rolled back, some remote DBs may be in-doubt
    Cause: Network or remote failure during a two-phase commit.
    Action: Notify operations; remote databases will automatically re-sync when the failure is repaired.
    ORA-02068 following severe error from stringstring
    Cause: A severe error (disconnect, fatal Oracle error) was received from the indicated database link. See following error text.
    Action: Contact the remote system administrator.
    M.S.Taj

  • Issue with complete refresh on materialized view when using rownum

    Hi all,
    I had an issue with rownum when using complete refresh
    I am using rownum when creating materialized view and it is generation correctly.But the issue was when i am refreshing the same ,rownum was not getting sorted in ascending order.
    anyone had come across this scenario

    rownum is determined as the row is output, so "order by rownum" does literally nothing.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm

  • Materialized view refresh using connected user db links

    I have a general question. I have a materialized view that more or less joins tables from 2 databases.
    For example I have a table X in database A, and a table Y in database B. I create the materialized view in the schema owning table X in database A. Tables A & B from both database are in the same schema with a synchronized password. My materialized view is created to join tables A & B using connected user DB links, and everything works when I create the view, however, it appears that the refresh is failing. I suspect this is because of the connected user link and there is no "logged" in user when the refresh occurs.
    Does anyone know if it is possible to create a materialized view between 2 tables in different databases to refresh using a connected user DB link?
    Thanks.

    sybrandb
    Why does it not make sense to have materialized views accross databases?
    If a materialized view is essentially a remote copy, then wouldn't that imply accross databases? The only thing I did was to take it a step further and join it with a local table in the owning database.
    About not being right about not having a connected user., that may be right, but I have a thought/question..... I equated this as using connected user links in jobs scheduled via dbms_job or dbms_scheduler, as when this runs there is no user connected to the database to provide remote credentials for the link... Essentially this seems to be like a cron job that fires on some schedule (whether a user is connected or not), it would seem to me that it might need to have credentials defined in order to be able to connect to the remote database.
    Thanks

  • Materialized View cannot use filter columns ORA-12033

    Hello Forum members,
    I am creating the following MV with Can you please advise me??
    Thanks
    SQL> create materialized view log on his_swi with rowid including new values;
    Materialized view log created.
    SQL>
    SQL> CREATE MATERIALIZED VIEW His_Swi_mv
    2 refresh fast with rowid
    3 AS
    4 select quarter,sum(sw_po),sum(sw_po_fre),
    5 sum(sw_por_sta+sw_porunt_swi+sw_por_hb+sw_po_free) as proj from
    6 history_switch group by quarter;
    his_swi group by quarter
    ERROR at line 6:
    ORA-12033: cannot use filter columns from materialized view log on
    "EM"."HIS_SWI"

    Hello Forum members,
    Please ignore the above post.
    got solution from : http://www.jusungyang.com/DWfolder/MaterializedViews/MVlogFilterColumns.txt
    Thanks

  • Update sequence wrong in Materialized view when using refresh group

    Hi,
    I made a trigger (for each row) on a materialized view(replication data from a master table in in a different database), which is refreshed by a refresh group (exec dbms_refresh.refresh('"...). However, the update order/sequence is important and must be handled (by the trigger) in the same order how the updates where done in the master table. Unfortunately the updates in the materialized view are NOT in the same order. The trigger is fired in a wrong order.
    I am using database version 10.2.0
    Does anybody reconize this problem, Is there a solution for this problem ( with keeping the refresh group mechanisme)?
    Thanks
    Regards
    Jurn

    rownum is determined as the row is output, so "order by rownum" does literally nothing.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm

  • Query on Materialized View created on Prebuilt Table

    Hi,
    I am trying to explain the scenario below on Materialized View which I want to setup for our database.
    I have created a materialized view on prebuilt table on target side on primary key. Now for purging history data from target side which are more than 5 years old I have executed the following steps:
    1. Dropped the materialized view which was created previously on prebuilt table in target side.
    2. Deleted the data from that target table which are more than 5 years old.
    3. Now created the materialized view again on the prebuilt table.
    Now, the problem which I am facing is that - if any changes happens in the source side during the above 3 steps on the target side those changed records were not captured even after successfully building materialized view again in the target side (i.e. after completing step-3 of above the intermediate changed records were not captured).
    Can you please let me know exactly what I am doing wrong here and how can I achieve my intended result.
    Regards,
    Koushik

    See matelink for doc id *252246.1*. The document id says: A materialized view was defined on a Table A. This table had a referential constraint defined against another table, Table B. This constraint was defined as 'ON DELETE CASCADE'. An 'ON DELETE CASCADE' constraint is not allowed on views but as the constraint was created on the table underlying the materialized view, Table A, it could be created although it would behave as a constraint on the view. The constraint existed for performance reasons, which is permitted, and was disabled when created but a general script had been run to enable all constraints. When a delete was performed on Table B the error above was reported although there was no view created on Table B.

  • How to make a view created using enhancement framework as Interface View

    Dear Experts.
    I Created A  new View and window  by using Enhancement Framework for a standard webdynpro comp. Now i want to use the same window as a  UIBB in FPM , since in window properties interface view check box is unchecked it's not allowing me to use a UIBB in FPM.
    Kindly answer for the following.
    1) Is there any way to make a view a interface ( whcih is by default in nature but while creating from Enhancement framework behaivng Strangly).
    2) If there is no way then how to use enhanced (additional View Created  in Standard WDA comp) further like in FPM ( UIBB ).
    thanks in Advance.
    Best Regards,
    Kranthikumar Palle

    >
    kranthi9121 wrote:
    > Dear Experts.
    >
    > I Created A  new View and window  by using Enhancement Framework for a standard webdynpro comp. Now i want to use the same window as a  UIBB in FPM , since in window properties interface view check box is unchecked it's not allowing me to use a UIBB in FPM.
    >
    > Kindly answer for the following.
    >
    > 1) Is there any way to make a view a interface ( whcih is by default in nature but while creating from Enhancement framework behaivng Strangly).
    >
    > 2) If there is no way then how to use enhanced (additional View Created  in Standard WDA comp) further like in FPM ( UIBB ).
    >
    >
    > thanks in Advance.
    >
    > Best Regards,
    > Kranthikumar Palle
    Hi,
    Please see [https://cw.sdn.sap.com/cw/docs/DOC-21546|https://cw.sdn.sap.com/cw/docs/DOC-21546]
    windows created through enhancement are local to component and hence they are not visible outside.
    You need to find other way to provide your interface view to UIBB.

  • Power View Created Using Excel Data are not visible in BI Docs

    I have created a Excel sheet with data and Then I added a Power View for that data set. I added this Excel Sheet to the Power BI Docs in Office 365 share-point Online. But when I open this uploaded Excel file.
    There is only the Datasheet but no pages of Power Views of that data. How can I make this power Views visible in the Excel sheet.
    Thanks
     

    Normally, when you open an excel file, using excel online, (not on phone or tablette, just by using your laptop) the report will appear correctly.
    I was in your case when i didn't have right access in Power BI in Office 365, so make sure that your account have right access in Power BI in Office 365. (you can talk to the administrator of Office 365 for more information).

  • Materialized View and Database startup

    I have materialized view created using following query
    CREATE MATERIALIZED VIEW dept_mv_dltb
    REFRESH FAST START WITH SYSDATE
    NEXT SYSDATE + 1/1440
    WITH PRIMARY KEY
    AS SELECT * FROM department@phinixdept
    I have log created on department table.
    Whenever my database gets restarted, my mv doesnt get refreshed.
    Please suggest a solution.

    It doesnt refresh ever again.
    I am using Oracle 9.2.0.5
    It does work after creation. But fails only when my database gets restarted.
    Followings are the trace file contents
    ORA-12012: error on auto execute of job 50
    ORA-12560: TNS:protocol adapter error
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    *** SESSION ID:(22.14163) 2007-09-15 23:37:18.810
    *** 2007-09-15 23:37:18.810
    ORA-12012: error on auto execute of job 50
    ORA-12560: TNS:protocol adapter error
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    Message was edited by:
    Pravin Pawar

  • Error while creating Materialized View step 3 of 6 using wizard

    have oracle 9i Rel 1 on Windows 2000 server. Master Site has been setup. Database links are created at Materialized view site. But while creating Materialized View Group using wizard there is following error on step 3 of 6.
    Statement:----------------
    /*OracleOEM*/ SELECT 1 FROM SYS.dba_constraints@masterdbname WHERE OWNER='username' and table_name='tabname' AND constraint_type='P'
    Stack Trace:----------------
    ORA-00942: table or view does not exist.
    ORA-02063: preceding line from masterdbname.
    All parameters for replication are correct.
    Please help me early.
    Thanks

    Hello,
    In the masterdbname, logging as sys user, you must grant select permission on sys.dba_constraints view to mvadmin_dbname user (where dbname is the replicated database name).
    Regards,

Maybe you are looking for