Help me on the Mview Refresh

The below is the Mview script using:
When i run the script it is taking very long.CAn any one suggest me how I can make THE REFRESH FASTER?
i AM USING 10gR2 Database:
I not able to tune the performance of this mview.I can not go with fast refresh because My query is complex.
CREATE MATERIALIZED VIEW "RM_P01"."BILL_STUDENT_ID_A_CAT_VIEW" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
AS
SELECT DISTINCT(sch_cat.STUDENT_ID)
FROM rm_bil_bill sch_cat,
cp_arch_school scl_category ,
rm_arr_ntf arrnft1
WHERE sch_cat.student_id = arrnft1.student_id
AND sch_cat.SCHOOL_CODE = scl_category.SCHOOL_CODE
AND arrnft1.status = 2
AND scl_category.TYPE_CODE = 'A';
CREATE MATERIALIZED VIEW "RM_P01"."BILL_STUDENT_ID_G_CAT_VIEW" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
AS
SELECT DISTINCT(sch_cat.STUDENT_ID)
FROM rm_bil_bill sch_cat,
cp_arch_school scl_category ,
rm_arr_ntf arrnft1
WHERE sch_cat.student_id = arrnft1.student_id
AND sch_cat.SCHOOL_CODE = scl_category.SCHOOL_CODE
AND arrnft1.status = 2
AND scl_category.TYPE_CODE = 'G';
CREATE MATERIALIZED VIEW "RM_P01"."BILL_STUDENT_ID_I_CAT_VIEW" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
AS
SELECT DISTINCT(sch_cat.STUDENT_ID)
FROM rm_bil_bill sch_cat,
cp_arch_school scl_category ,
rm_arr_ntf arrnft1
WHERE sch_cat.student_id = arrnft1.student_id
AND sch_cat.SCHOOL_CODE = scl_category.SCHOOL_CODE
AND arrnft1.status = 2
AND scl_category.TYPE_CODE = 'I';
CREATE MATERIALIZED VIEW "RM_P01"."RM_BIL_ACCT_MV" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
AS
SELECT com.student_id,
cp.level_xcode,
DECODE (SUBSTR (cp.level_xcode, 1, 1), '1', 'P', '3', 'S', 'J' ) aca_level,
balance,
DECODE (SIGN (balance), -1, balance, 0) credit_balance,
cp.school_code
FROM rm_com_stud com,
cp_stud_profile cp,
rm_bil_acct acc
WHERE acc.student_id = com.student_id
AND com.cp_student_id = cp.student_id;
CREATE MATERIALIZED VIEW "RM_P01"."RM_REV_KNOCK_OFF_COLL_DTL_MV" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
AS
SELECT d.bill_id,
d.item_id,
d.item_type,
d.net_charges,
d.outstanding_bal,
NVL (d.active_status, 'Y') active_status
FROM rm_rev_knock_off_coll_dtl d,
rm_rev_knock_off_coll m
WHERE d.outstanding_bal > 0
AND d.bill_id =m.bill_id
AND m.bill_month <
(SELECT MAX(a.bill_month) FROM rm_bil_month a
CREATE MATERIALIZED VIEW "RM_P01"."RM_REV_KNOCK_OFF_COLL_MV" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
AS
SELECT bill_id,
bill_month,
student_id,
academic_level,
amount_collected,
net_charges,
full_payment_ind,
active_status
FROM rm_rev_knock_off_coll
WHERE amount_collected < net_charges
AND full_payment_ind = 'N'
AND bill_month <
(SELECT MAX(a.bill_month) FROM rm_bil_month a
CREATE MATERIALIZED VIEW "RM_P01"."RM_REV_KOFF_CURR_MV" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND
WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE AS
SELECT bill_id,
bill_month,
student_id,
academic_level,
amount_collected,
net_charges,
full_payment_ind,
active_status
FROM rm_rev_knock_off_coll
WHERE amount_collected < net_charges
AND full_payment_ind = 'N';
CREATE MATERIALIZED VIEW "RM_P01"."RM_REV_KOFF_DTL_CURR_MV" ON PREBUILT TABLE WITHOUT REDUCED PRECISION USING INDEX REFRESH FORCE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
AS
SELECT d.bill_id,
d.item_id,
d.item_type,
d.net_charges,
d.outstanding_bal,
NVL (d.active_status, 'Y') active_status
FROM rm_rev_knock_off_coll_dtl d,
rm_rev_knock_off_coll m
WHERE d.outstanding_bal > 0
Regards,
Ashlee

Make sure the querys you're performing on the data collection process are properly tunned.
You could try to extract an "explain plan" for every one, and check if they're using proper indexes and not performing full scans, for example.
There's plenty of docs on the internet if you look for "Explain plan usage".
You can also take snapshots before and after the refresh process and take an AWR report to check what's making the process to take so long.
You can find AWR reports interpretation guides looking for "StatsPack / AWR Survival guide" on the internet.
Good luck.
Regards,
Enric Moya

Similar Messages

  • The File/edit/view/history/tools/help bar and the Back/refresh/and home buttons that used to be on the top left of the screen are no longer there. I want them back

    I don't know what I did, maybe download a more recent version of firefox, but I no longer have any of the file/edit/view/history/bookmarks/tools/help bar on upper left hand of the screen.
    I also lost the BACK button the refresh or undo button and the home button.
    where did they go and how do I get them back?
    Thanks
    Jim F

    Aha! I found the "refresh" button at the end of the place where I enter the URL. don't know where "home" is yet, but my home page has mysteriously appeared in the tool bar above the URL.

  • Mview Refresh Taking more time

    Hi Team,
        Am using Materialized Mview refresh for my database,with refresh type as fast.
    Previously the mview refresh completed within 10-15minutes,but now the mview refresh taking more than 150min to complete.
    Please suggest on the above issue.
    With Regards,
    Venkatesh J.

    Venkateshj wrote:
    Hi Team,
        Am Using Oracle Database 11g, Version 11.1.0.7.0.
    In that am using Materialized Mview refresh for my database,with refresh type as fast.
    Previously the mview refresh completed within 10-15minutes,but now the mview refresh taking more than 150min to complete.
    Please suggest on the above issue for tuning.
    Thanks in advance
    With Regards,
    Venkatesh J.
    HOW To Make TUNING request
    https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360003

  • How to infer the status of MView/Refresh from LAST_REFRESH_DATE

    Hi,
    I am having a MView "MV_SCI_COLLATERAL_INFO" in Production. It is working fine in development environment.
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production"
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    CREATE MATERIALIZED VIEW MV_SCI_COLLATERAL_INFO
      BUILD IMMEDIATE
      USING INDEX
      REFRESH FORCE ON DEMAND START WITH SYSDATE+0 NEXT SYSDATE + 5/1440
      USING DEFAULT LOCAL ROLLBACK SEGMENT
      USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE
      AS SELECT * FROM COLLATERAL_INFO@BLINK;
    SELECT mview_name, last_refresh_date, refresh_method, invalid, UNUSABLE
      FROM all_mview_analysis
    WHERE mview_name IN ('MV_SCI_COLLATERAL_INFO');
    MVIEW_NAME
    LAST_REFRESH_DATE
    REFRESH_METHOD
    INVALID
    UNUSABLE
    MV_SCI_COLLATERAL_INFO
    23-JUN-13 01:26:53
    FORCE
    N
    N
    Job Details:
    Job
    Log_user
    Privilege_User
    Schema_User
    Last_Date
    This_Date
    Next_Date
    Total_Time
    Broken
    Interval
    Failures
    What
    166
    OCCSS_BOWBMS_HK
    OCCSS_BOWBMS_HK
    OCCSS_BOWBMS_HK
    6/23/2013 1:26
    6/23/2013 1:31
    6/23/2013 1:31
    4272898
    N
    SYSDATE + 5/1440
    0
    dbms_refresh.refresh('"OCCSS_BOWBMS_HK"."MV_SCI_COLLATERAL_INFO"');
    I believe the MView is valid. And it is scheduled to run for every 5 minutes. But from the last refreshed date i couldn't see the latest date. Am i infering the column wrong?
    Isn't my MView refreshing on every 5 minutes? In the event of any errors, how to check?

    you have created the MVIEW with option "REFRESh FORCE ON DEMAND" which means that it will not refresh the MVIEW automatically.
    Specify ON DEMAND to indicate that database will not refresh the materialized view unless the user manually launches a refresh through one of the three DBMS_MVIEW refresh procedures.

  • I can't open personal accounts on the internet. After entering ID and Password then the enter key, it's as if the screen refreshes itself and wants me to start over. Help Please.

    I can't open personal accounts on the internet. After entering ID and Password then the enter key, it's as if the screen refreshes itself and wants me to start over. Help Please.

    Click here and follow the instructions.
    (72059)

  • Can't create the mview with refresh on each commit

    I have these underlying tables:
    SQL> desc ta_footn_typ
    Namn Null? Typ
    FOOTN_TYP_ID NOT NULL VARCHAR2(2)
    APPL_COD CHAR(1)
    NATIONAL_DATA NUMBER(1)
    (FOOTN_TYP_ID is a PK)
    SQL> desc TA_S_DESC_FOOTN_TYP
    Namn Null? Typ
    FOOTN_TYP_ID NOT NULL VARCHAR2(2)
    LANG_COD NOT NULL CHAR(2)
    FOOTN_TYP_DESCR VARCHAR2(100)
    (FOOTN_TYP_ID and LANG_COD is a composite PK)
    from these two tables I would like to build a mateerialized view with refresh
    on commit with the following select-statement:
    select type.*, eng.FOOTN_TYP_DESCR as FOOTN_TYP_DESCR_ENG, nat.FOOTN_TYP_DESCR
    as FOOTN_TYP_DESCR_NAT from TA_FOOTN_TYP type
    left join TA_S_DESC_FOOTN_TYP eng on eng.FOOTN_TYP_ID = type.FOOTN_TYP_ID and
    eng.LANG_COD='EN'
    left join TA_S_DESC_FOOTN_TYP nat on nat.FOOTN_TYP_ID = type.FOOTN_TYP_ID and
    nat.LANG_COD='EE'
    I can create the mview with the options:
    on demand, automatically on, never
    but that is not interesting for me,
    I need refresh on commit on the underlying
    tables.
    So I tried -->
    CREATE MATERIALIZED VIEW "EMTS_NF"."MY_MVIEW"
    TABLESPACE "EMTS_EMTS_NF"
    BUILD IMMEDIATE
    USING INDEX
    TABLESPACE "EMTS_EMTS_NF"
    REFRESH FORCE
    ON COMMIT
    AS
    select type.*, eng.FOOTN_TYP_DESCR as FOOTN_TYP_DESCR_ENG, nat.FOOTN_TYP_DESCR
    as FOOTN_TYP_DESCR_NAT from TA_FOOTN_TYP type
    left join TA_S_DESC_FOOTN_TYP eng on eng.FOOTN_TYP_ID = type.FOOTN_TYP_ID and
    eng.LANG_COD='EN'
    left join TA_S_DESC_FOOTN_TYP nat on nat.FOOTN_TYP_ID = type.FOOTN_TYP_ID and
    nat.LANG_COD='EE';
    But it gives mee ORA-12054,
    any advices???

    Try it with REFRESH FAST instead of REFRESH FORCE.
    Cheers, APC

  • MVIEW Refresh Error

    I have a materialized view "pro_mview",
    I am trying to refresh the MVIEW by using the following statement.
    EXEC DBMS_MVIEW.REFRESH('pro_mview','C');
    But I am getting the below error.
    Error at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2256
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2462
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2431
    ORA-06512: at line 1
    I am able to fetch the data from that materialized view(pro_mview).
    Please help me how to overcome this problem.
    Thanks in advance.

    Hi,
    SQL> execute DBMS_SNAPSHOT.REFRESH_ALL;
    http://www.databasejournal.com/features/oracle/article.php/2200191/Manually-Refreshing-Materialized-Views-and-Creating-Refresh-Groups-in-Oracle.htm
    Regards
    Hitgon

  • Mview refresh and ORA-12008 error

    I am getting the following when I try to refresh a materialized view. This error occurs the first time I try to refresh, then if I try again, the refresh is successful.
    Most of what I have been able to glean about this error is that it is related to M$log changes, however, this view does not use nor build upon an other views that use, mview logs. Any ideas?
    ORA-12008: error in materialized view refresh path
    ORA-01555: snapshot too old: rollback segment number 13 with name "_SYSSMU13$" too small
    ORA-02063: preceding line from db1
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2537
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2743
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2712
    ORA-06512: at line 2

    Hi j_70!
    I'm not exactly sure about the answer, but I guess that the ORA-01555 is the main problem. Have you tried to grow your Undotablespace? I think that the refresh of the MVIEW takes a long time (like a long SELECT-Statement) and if there are many UPDATE and INSERT-Statements while the refresh is in progress than ORA-01555 may be the consequence.
    If you have Oracle 10g use the Undo-Advisor to look for the problem.
    Hope this helps!

  • Need help on tuning materialized view refresh

    Hi All,
    I am working on materialized view refresh tuning.Initially it was complete refresh and used to take more than 90 mins to complete.
    I changed it to fast refresh now it is completing fast. Now i have partitioned the base tables gl_balances and gl_code_combinations of column code_combination_id and created a local index on column code_combination_id then i am trying to partition the materialized on the same column to take advantage of partition change tracking.
    Size of gl_balances base tables is 40Gb and all others tables sizes are small. In where clause there all the 4 tables are mapped. If i will create the partition only on code_combination_id will i the materialized will become the candidate for partition change tracking. As i know it will be applicable for PCT. I need expert advice on this.
    While doing a fast refresh. the refresh takes less time. when there is a change in gl_balances , gl_code_combinations or gl_periods it completes in 20-30 mins. When there is a change in gl_set_of_books tables. It creates a problem here.DEL query takes more than 48 hours to complete.
    CREATE MATERIALIZED VIEW apps.BAL_PART
    REFRESH FAST ON DEMAND
    ENABLE QUERY REWRITE as
    SELECT GL.GL_CODE_COMBINATIONS21.ROWID C1,GL.GL_BALANCES21.ROWID C2, GL.GL_SETS_OF_BOOKS.ROWID C3,
    GL.GL_PERIOD.ROWID C4,
    "GL"."GL_BALANCES21"."ACTUAL_FLAG" ,
    "GL"."GL_BALANCES21"."CURRENCY_CODE" ,
    "GL"."GL_BALANCES21"."PERIOD_NUM" ,
    "GL"."GL_BALANCES21"."PERIOD_YEAR" ,
    "GL"."GL_BALANCES21"."SET_OF_BOOKS_ID" "SOB_ID",
    "GL"."GL_CODE_COMBINATIONS21"."CODE_COMBINATION_ID" "CCID",
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT1" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT10" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT11" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT12" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT13" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT14" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT2" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT3" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT4" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT5" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT6" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT7" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT8" ,
    "GL"."GL_CODE_COMBINATIONS21"."SEGMENT9" ,
    "GL"."GL_PERIODS"."PERIOD_NAME" ,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal_Cr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal_Cr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) Open_Bal_Dr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) +
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Close_Bal_Dr,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal,
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
    NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) -
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal,
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Period_Cr,
    NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Period_Dr
    FROM GL.GL_CODE_COMBINATIONS21,
    GL.GL_BALANCES21,
    GL.GL_SETS_OF_BOOKS,
    GL.GL_PERIODS
    WHERE GL.GL_BALANCES21.CODE_COMBINATION_ID =GL.GL_CODE_COMBINATIONS21.CODE_COMBINATION_ID
    AND GL.GL_SETS_OF_BOOKS.SET_OF_BOOKS_ID = GL.GL_BALANCES21.SET_OF_BOOKS_ID
    AND GL.GL_PERIODS.PERIOD_NUM = GL.GL_BALANCES21.PERIOD_NUM
    AND GL.GL_PERIODS.PERIOD_YEAR = GL.GL_BALANCES21.PERIOD_YEAR
    AND GL.GL_PERIODS.PERIOD_TYPE = GL.GL_BALANCES21.PERIOD_TYPE
    AND GL.GL_PERIODS.PERIOD_NAME = GL.GL_BALANCES21.PERIOD_NAME
    AND GL.GL_PERIODS.PERIOD_SET_NAME = GL.GL_SETS_OF_BOOKS.PERIOD_SET_NAME
    and gl.GL_CODE_COMBINATIONS21.summary_flag != 'Y'TRACE 1046 del statement
    DELETE FROM "APPS"."apps.BAL_PART" SNA$
    WHERE "C3" IN (SELECT /*+ NO_MERGE  */ * FROM (SELECT 
      CHARTOROWID("MAS$"."M_ROW$$") RID$     FROM "GL"."MLOG$_GL_SETS_OF_BOOKS"
      "MAS$"   WHERE "MAS$".SNAPTIME$$ > :B_ST1 ) AS OF SNAPSHOT(:B_SCN) MAS$)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1  17759.00  171782.99  159422121    1267371 2564144739           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2  17759.00  171782.99  159422121    1267371 2564144739           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 175  (APPS)   (recursive depth: 1)
    Rows     Row Source Operation
          0  DELETE  apps.BAL_PART (cr=0 pr=0 pw=0 time=0 us)
    193128740   NESTED LOOPS  (cr=592437 pr=592422 pw=0 time=945244160 us cost=339302 size=168 card=1)
          3    SORT UNIQUE (cr=7 pr=0 pw=0 time=15832 us cost=2 size=138 card=1)
         24     TABLE ACCESS FULL MLOG$_GL_SETS_OF_BOOKS (cr=7 pr=0 pw=0 time=19 us cost=2 size=138 card=1)
    193128740    INDEX RANGE SCAN C3BOOKS (cr=592430 pr=592422 pw=0 time=789499200 us cost=339299 size=3318314250 card=110610475)(object id 2114736)
    error during execute of EXPLAIN PLAN statement
    ORA-08187: snapshot expression not allowed here
    parse error offset: 314
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                   159520897        2.12     144415.96
      latch: cache buffers chains                   134        0.06          0.68
      latch: undo global data                        33        0.02          0.15
      latch: object queue header operation          521        0.02          0.53
      log file switch (private strand flush incomplete)
                                                    532        0.31         28.26
      resmgr:cpu quantum                            155        1.40         13.49
      resmgr:internal state change                   25        0.11          2.21
      latch free                                     10        0.00          0.00
      latch: cache buffers lru chain                  4        0.00          0.00
      rdbms ipc reply                               489        0.02          0.54
      reliable message                              587        0.00          0.56
      latch: row cache objects                        3        0.00          0.00
    ********************************************************************************GL_SETS_OF_BOOKS has only 6 rows. I know there is complete refresh as a option which will again take more than 90 mins.
    I want to do the fast refresh. Tables rows details below.
    SQL> select count(*) from gl.gl_code_combinations21;
    COUNT(*)
    3075255
    SQL> select count(*) from gl.GL_PERIODS;
    COUNT(*)
    1160
    SQL> select count(*) from gl.gl_balances21;
    COUNT(*)
    477613527
    SQL> select count(*) from gl.gl_sets_of_books;
    COUNT(*)
    6gl_sets_of_books has less rows. Whenever there is a change then it mapped to huge rows hence during materialized view has delete huge number of rows.
    select count(*) from apps.BAL_PART group by C3;
    C3 is the rowid which is present in create materialized statement.
    COUNT(*)
    292927011
    210215
    69330
    184406971
    Is there any way to improve the plan. As i created a partition on code_combination_id and local index on code_combination_id which will not help in set_of_books_id case. I dont PCT will help here or not. Is it possible to use PCT refresh by equipartitioning only one column in where clause.
    Please assist me in improving refresh of materialized view using fast refresh.
    Thanks and Regards,
    Edited by: user646034 on Feb 23, 2013 11:13 PM
    Edited by: user646034 on Feb 23, 2013 11:19 PM
    Edited by: user646034 on Feb 23, 2013 11:46 PM
    Edited by: user646034 on Feb 25, 2013 11:46 AM

    Hi
    The below explain without index and with index.
    /* MV_REFRESH (DEL) */ DELETE FROM "APPS"."BAL_PART                                                                                                                                                                                                                                                                                                                                                                                                                
    " SNA$ WHERE "C3" IN (SELECT /*+ NO_MERGE  */ * FROM (SELECT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    CHARTOROWID("MAS$"."M_ROW$$") RID$     FROM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    "GL"."MLOG$_GL_SETS_OF_BOOKS" "MAS$"   WHERE "MAS$".SNAPTIME$$ > :B_ST1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    ) AS OF SNAPSHOT(:B_SCN) MAS$)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
    Plan hash value: 2704021294                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Id  | Operation            | Name                          | E-Rows |E-Bytes| Cost (%CPU)| E-Time   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   0 | DELETE STATEMENT     |                               |        |       |   339K(100)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   1 |  DELETE              | BAL_PART                          |        |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   2 |   NESTED LOOPS       |                               |      1 |   168 |   339K  (1)|999:59:59 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   3 |    SORT UNIQUE       |                               |      1 |   138 |     2   (0)| 00:02:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   4 |     TABLE ACCESS FULL| MLOG$_GL_SETS_OF_BOOKS        |      1 |   138 |     2   (0)| 00:02:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    |   5 |    INDEX RANGE SCAN  | C3BOOKS                       |    110M|  3164M|   339K  (0)|999:59:59 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    If i will not use the C3 index then the query will use the belolw plan, I guess this will also take same time or more time.
    |   0 | DELETE STATEMENT       |                               |        |       |  9743K(100)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
    |   1 |  DELETE                | BAL_PART                          |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                     

  • MVIEW refresh takes long time

    Materialized view takes long time to refresh but when i tried select & insert into table it's very fast.
    i executed SQL and it takes ust 1min ( total rows is 447 )
    but while i refresh the MVIEW it takes 1.5 hrs ( total rows is 447 )
    MVIEW configration :-
    CREATE MATERIALIZED VIEW EVAL.EVALSEARCH_PRV_LWC
    TABLESPACE EVAL_T_S_01
    NOCACHE
    NOLOGGING
    NOCOMPRESS
    NOPARALLEL
    BUILD DEFERRED
    REFRESH FORCE ON DEMAND
    WITH PRIMARY KEY
    Not sure why so much diffrence

    infant_raj wrote:
    Materialized view takes long time to refresh but when i tried select & insert into table it's very fast.
    i executed SQL and it takes ust 1min ( total rows is 447 )
    but while i refresh the MVIEW it takes 1.5 hrs ( total rows is 447 )A SELECT does a consistent read.
    A MV refresh does that and also writes database data.
    These are not the same thing and cannot be directly compared.
    So instead of pointing at the SELECT execution time and asking why the MV refresh is not as fast, look instead WHAT the refresh is doing and HOW it is doing that.
    Is the execution plan sane? What events are the top ones for the MV refresh? What are the wait states that contributes most to the processing time of the refresh?
    You cannot use the SELECT statement's execution time as a direct comparison metric. The work done by the refresh is more than the work done by the SELECT. You need to determine exactly what work is done by the refresh and whether that work is done in a reasonable time, and how other sessions are impacting the refresh (it could very well be blocked by another session).

  • How to find the last refresh of database?

    Hi,
    Can someone tell me how to find when was the last refresh of a database was done.

    Now it is much better!!!
    1. If the cloning was done using a cold backup of
    database, how can we know when was the last cloning
    on testing db done.If the cloned database has been opened with RESETLOGS option, you can try checking out V$DATABASE.RESETLOGS_TIME. if the V$DATABASE.CREATED is not equal to V$DATABASE.RESETLOGS_TIME...there is a possibility that it might be opened with resetlogs option. I don't have the required set up to check and confirm this myself....but this is something you can get it a shot.
    2. If export/import utility is used for this purpose,
    the how can we find out the last time the testing db
    was 'refreshed'?If import was used, check the object creation timestamps of majority of them...may be it will help you find the required information.
    HTH
    Thanks
    Chandra Pabba

  • On commit for mview refresh is not generated in DDL

    New design > relational > new table w/ single numeric column
    New Oracle 11g physical > new materialized view > on prebuilt table from above > Refresh Clause tab > select ON COMMIT action
    -- add a body for grins
    resulting XML in saved design:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SnapshotOraclev11g class="oracle.dbtools.crest.model.design.storage.oracle.v11g.SnapshotOraclev11g" name="TABLE_1" id="E092B588-B0A8-437A-4187-9999090405D9" directorySegmentName="seg_0">
    <createdBy>kdavis1</createdBy>
    <createdTime>2012-07-18 15:28:57 UTC</createdTime>
    <ownerDesignName>OTN_Issue_20120717a</ownerDesignName>
    <action>ON COMMIT</action>
    <defaultSegment>NO</defaultSegment>
    <onPrebuiltTable>8332B16F-E06B-86AC-E123-DDA4F5DFF794</onPrebuiltTable>
    </SnapshotOraclev11g>
    Resulting DDL lacks ON COMMIT:
    -- Generated by Oracle SQL Developer Data Modeler 3.1.1.703
    -- at: 2012-07-18 11:47:26 EDT
    -- site: Oracle Database 11g
    -- type: Oracle Database 11g
    CREATE TABLE "TABLE_1"
    "Column_1" NUMBER
    LOGGING
    CREATE MATERIALIZED VIEW "TABLE_1"
    ON PREBUILT TABLE
    AS select sum(foo) from bar
    -- Oracle SQL Developer Data Modeler Summary Report:
    -- CREATE TABLE 1
    -- CREATE INDEX 0
    -- ALTER TABLE 0
    -- CREATE VIEW 0
    -- CREATE PACKAGE 0
    -- CREATE PACKAGE BODY 0
    -- CREATE PROCEDURE 0
    -- CREATE FUNCTION 0
    -- CREATE TRIGGER 0
    -- ALTER TRIGGER 0
    -- CREATE STRUCTURED TYPE 0
    -- CREATE COLLECTION TYPE 0
    -- CREATE CLUSTER 0
    -- CREATE CONTEXT 0
    -- CREATE DATABASE 0
    -- CREATE DIMENSION 0
    -- CREATE DIRECTORY 0
    -- CREATE DISK GROUP 0
    -- CREATE ROLE 0
    -- CREATE ROLLBACK SEGMENT 0
    -- CREATE SEQUENCE 0
    -- CREATE MATERIALIZED VIEW 1
    -- CREATE SYNONYM 0
    -- CREATE TABLESPACE 0
    -- CREATE USER 0
    -- DROP TABLESPACE 0
    -- DROP DATABASE 0
    -- ERRORS 0
    -- WARNINGS 0
    Posts reviewed: (materialized && view) || mview || mv

    Yes but then shouldn't "Refresh Type" be blank (instead of FAST) like "Refresh Action" is blank by default.
    Or better yet, you already fill the mview name upon selection of a table for on prebuilt -- so should you select refresh YES upon choosing a type and/or action?
    Seems to be an inconsistency here.

  • How to use the standrad Refresh button in ooalv Grid?

    Hai Experts ,
                              i write editable oo alv program its works fine.  when change the data
    then click save button its saved correctly, but the problem is totals of row  & column not refresh when i am click the
    Refresh button . Please Help how to handle the standard Refresh button in ooalv .
    Thanks
    Adv....

    thank q u for ur reply,
                                            when i edit the data in grid and save the data its saved  successful,
    but the problem is manually i calculating the totals at the end of the Row as well as at end of the columns,
    when i edit the data in Grid that totals are not effected for that im using the Standard Refresh button ,
    Plz help me.

  • Need help using weblogic.Deployer to refresh a webapp

    I'm trying to refresh some jsp from a webapp deployed in exploded format
    in WLS 8.1SP3
    The original source files are not located on the machine or filesystem
    running the admin server (the webapp is deployed on a cluster)
    On WLS 6.1SP5, we use weblogic.refresh to upload the files to the admin
    server and redeploy the refreshed files.
    The documentation suggest to use weblogic.Deployer with WLS8.1 since
    weblogic.refresh is deprecated.
    I couldn't find the correct command line options to reproduced the
    weblogic.refresh behaviour. Apparently it is not possible to upload the
    files to the admin server and redeploy in a single step. weblogic.Deployer
    expects the file to be already available to the admin server before
    issuing the redeploy (using rsync, ftp or whatever). Is this correct ?
    What did I miss ?
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

    I thought you've got error of another type - that error is fixed by simple software update.
    Regarding your case - it's always frightening in first time. Believe me - there's completely nothing to be afraid of.
    Resizing C drive may result killing your DATA on it only in case of energy is down during the process. Process is taking about 15-20 minutes on slow programs and about 3-4 minutes on fast programs. That means that even having problems with electricity you'll be able to finish everything correctly running on battery.
    I'd recommend using Acronis Disk director Suite, but it is not free. One of the best free progs for that are bootable Linux livecds PartedMagic and GParted. They're all intuitive understandable. 
    You will get your NOVO recovery feature lost after C resize, but you can enable it later, replacing that factory backup in hidden partition with your own backup - your NOVO button will restore your system with all your software and settings.
    it will be good for you to start with some basic principles on partitions organization schemes - why, what for and how questions are briefly explained here. After reading this you'll be able to ask right questions to get right answers.
    //help will save the world

  • I need help in understanding the customization of Landscape in R/3.

    I need help in understanding the customization of Landscape in R/3. Setup of SAP Landscape from an SAP SD point of view. Being as SAP SD consultant what would be my role in customizing the Landscape server. Help needed. Thx

    Hi,
    In a standard SAP project implementation, the 3 standard transport procedures are:
    Development System (DEV) --> QA System (QAS) --> Production System (PRD)
    In the above structure, the Training Client (TRN) could be made from the copy of PRD (after when real-time master data has been available) or from QA system (where configuration has been tested in DEV client, and the master data is uploaded manually for training purposes)
    Sandbox (standalone): This can be refreshed with Golden Client to reflect the latest configuration performed to facilitate the development/testing purposes.
    -Development (DEV): Where all system configurations and development activities are carried out.
    -Quality Assurance (QAS): Where functional testing is carried out. The System Integration Testing (carried out by the -Development Team) and the User Acceptance Testing (carried out by XXX appointed personnel) is carried out in this server.
    -Training (TRN): End Users are trained on this server.
    -Production (PRD): After the System is commissioned all data entry and administrative functions will be carried out in this server.
    This is by far the standard landscape architecture that is adopted and practiced in most implementations.
    Hope the above helps.
    Thanks.

Maybe you are looking for

  • Update to existing User Tip

    This is an update to Date and Time in the Menu Bar (10.3, 10.4) to account for the fact that it is also applicable in 10.5. In addition it corrects the appearance of 4 horizontal rules in the table which appear because the Jive software is broken if

  • ID3 Tags In iTunes 8 Part 2

    Hi there. I posted this in Nathanel's earlier post but since that thread is marked 'Answered' was worried no one would respond. I right clicked on tracks and couldn't find the Convert Tags option in the dropdown. It's not in the Advanced menus either

  • Mac book air doesn't start

    Hi For 1 week now, my computer stops when it's in standby and can't start when I push on power.  It doesn't start for like 2 days and rework. and again and again... The battery indicator is lighting when I plug the charger. Is that the motherboard? I

  • Asking for passcode when trying to change restrictions on iphone 3gs

    In response to a person on here for deleting a gmail account from an iphone 3GS I can not enter the passcode for restrictions? Can anyone assist?

  • Need driver for Selphy CP400 for Mac OS X 10.9.5

    Hello! I received a Canon Selphy CP400 photo printer brand new and for free from my mother. I have finally gotten around to setting it up, can't use the disc since I don't have an optical drive on my Macbook Pro Retina. The Canon website says there i