Snapshot refresh time

Hi
I have the following snapshot on oracle 8.1 :
CREATE SNAPSHOT LSBAN30Y_SNP
PCTFREE 0
PCTUSED 99
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 256000 K
NEXT 25600 K
MINEXTENTS 1
MAXEXTENTS 505
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT)
TABLESPACE BP_DATA
LOGGING
NOCACHE
NOPARALLEL
USING INDEX PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
BUFFER_POOL DEFAULT)
REFRESH COMPLETE
NEXT greatest(trunc(sysdate+1), NEXT_DAY(trunc(sysdate)-5 ,'MONDAY')) + 4/24 + 30/1440
WITH ROWID
USING DEFAULT LOCAL ROLLBACK SEGMENT
DISABLE QUERY REWRITE AS
SELECT
ACCT_ID BILLING_ACCOUNT_ID,
CUST_ID BLG_SYS_CUST_ID,
ACCT_ESTAB_DAT SYS_ACCT_ESTAB_DAT,
ACCT_STAT_CD SYS_ACCT_STS_CD ,
decode(SCE_SYS_ID, '1', 'C', '2', 'C', '3', 'C', '4', 'W', '5', 'W', '6', 'E', '7', 'E', null) LEG_SYS_RGN_INDR,
BTN BLG_ACCT_TLPHN_NO ,
BTN_CUST_CD,
BTN_SFX EASTERN_SUFFIX,
TYP_OF_ACCT_CD BTN_TYP_OF_ACCT_CD,
PRI_CLSS_ID CLSS_OF_SRVC_CD,
' ' BTN_CONTRACT_NO,
RTRIM(BLG_NM_LN1)||' ' ||LTRIM(BLG_NM_LN2) BTN_BILLING_NAME,
PCL_IND PCL_INDR,
BILL_PER SYS_BILL_PRD_INDR,
GR_ACCT_ID SYS_SPCL_BLG_GR_NO
FROM
CSBAN10V@UCDWP001
where ACCT_MKT_UN_ID in ('C', 'D', 'F', 'G', 'I', 'L', 'O', 'P',
'R', 'S', 'V', 'W')
and rownum < 5000000
I have created indexes on BILLING_ACCOUNT_ID and BLG_SYS_CUST_ID.
There are 4.3 million records in the snapshot.
It takes 6hrs to refresh the snapshot.
The questions I have are:
1. How can I reduce the refresh time? Is it because of the indexes? Should i make any change to the create snapshot script?
2. The create snaphot query works fine without the rownum < 500000 statement in oracle 9i but in oracle 8i it gives
CSBAN10V user not found in UCDWP001 error. It works OK with the rownum < 5000000 statement. Why is that so?
thanks
prash

You are specifying that the refresh must be COMPLETE, so Oracle has to transfer all 5,000,000 rows over the wire from the remote database every time. If you specified that the refresh could be FAST, and created a materialized view log on the remote table, Oracle would be able to transfer only the changed rows each time you refreshed.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Snapshot Refresh taking More Time

    Dear All,
    We are facing a Snapshot refresh problem currently in Production Environment.
    Oracle Version : Oracle8i Enterprise Edition Release 8.1.6.1.0
    Currently we have created a Snapshot on a Join with 2 remote tables using Synonyms.
    ex:
    CREATE SNAPSHOT XYZ REFRESH COMPLETE WITH ROWID
    AS
    SELECT a.* FROM SYN1 a, SYN2 b
    Where b.ACCT_NO=a.ACCT_NO;
    We have created a Index on the above Snapshot XYZ.
    Create index XYZ_IDX1 on XYZ (ACCT_NO);
    a. The Explain plan of the above query shows the Index Scan on SYN1.
    If we query above Select Statement,it hardly takes 2 seconds to exedute.
    b. But the Complete Refresh of Snapshot XYZ is almost taking 20 Mins for just truncating and inserting 500 records and is generating huge Disk Reads as SYN1 in remote table consists of 32 Million records whereas SYN2 contains only 500 Records.
    If we truncate and insert inot a table as performed by the Complete refresh of Snapshot,it hardly takes 4 Seconds to refresh the table.
    Please let me know what might be the possible reasons for the Complete refresh of Snapshot taking more time.

    Dear All,
    While refreshing the Snapshot XYZ,I could find the following.
    a. Sort/Merge operation was performed while inserting the data into Snapshot.
    INSERT /*+ APPEND */ INTO "XYZ"
    SELECT a.* FROM SYN1 a, SYN2 b Where b.ACCT_NO=a.ACCT_NO;
    The above operation performed huge disk reads.
    b. By Changing the session parameter sort_area_size ,the time decreased by 50% but still the disk reads are huge.
    I would like to know why Sort/Merge Operation is performed in the above Insert?
    Edited by: Prashanth Deshmukh on Mar 13, 2009 10:54 AM
    Edited by: Prashanth Deshmukh on Mar 13, 2009 10:55 AM

  • Snapshot refresh interval

    Hi,
    I would like to know how to create a snapshot refresh group that would refresh the snapshot daily between 0800 hrs to 1700 hrs.
    Appreciate any inputs.
    Thanks & Kind Regards,
    Zaid

    Standard disclaimer-- 8.0.5 has been desupported for many years, you really ought to upgrade. Most of the folks on this and other forums haven't seen an 8.0.5 system in quite some time, so there may be version-specific caveats that we've long forgotten.
    When a job fails, the error should be written to the alert log.
    When a job fails, it will be rescheduled with an increasing delay (1 sec, 2 sec, 4 sec, 8 sec, ...) for 16 times. If it fails 16 times in a row, the job is marked as broken.
    You can use the DBMS_JOB.BROKEN method to indicate that a job is no longer broken. You generally want to fix the underlying problem first, though.
    Justin

  • Snapshot Refresh (How to stop COMPLETE refresh and run FAST refresh)?

    Hi,
    I have a snapshot refresh executed as COMPLETE which is taking very long. When I try to kill this and try to run a FAST I get:
    ERROR at line 1:
    ORA-12057: materialized view "PORTALSNP1"."V21_BILLING_ACCOUNT" is INVALID an must complete refresh
    How can I resolve this to stop the COMPLETE refresh altogether and be able to run the FAST refresh.
    Also is there a way to get the time it will take to complete the running snapshot refresh?
    Please and thankYou!
    Regards,
    A

    You don't resolve it ... you drop the materialized view. Then you create a materialized view log. Then a properly coded MV.
    http://www.morganslibrary.org/library.html
    bookmark this link
    then look up "Materialized Views and "Materialized View Logs"
    The log must be created first.

  • Scheduling Snapshot refreshes

    Hi
    Need help here. The following is the script to create one of our snapshots.
    CREATE SNAPSHOT PREEM_VIEW_SNP
    PCTFREE 0
    PCTUSED 99
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 25600 K
    NEXT 5120 K
    MINEXTENTS 1
    MAXEXTENTS 505
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    TABLESPACE BP_DATA
    LOGGING
    NOCACHE
    NOPARALLEL
    USING INDEX PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    BUFFER_POOL DEFAULT)
    REFRESH COMPLETE
    NEXT TRUNC(SYSDATE+1) + 6.5/24
    WITH ROWID
    USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE AS
    select cust_id customer_id,BTN || BTN_CUST_CD || RPAD(BTN_SORT_CD, 1) || RPAD(BTN_SFX, 4) || RPAD(BTN_ST_CD, 1)BLG_ACCT_TLPHN_NO
    from CSBAN10V@UCDWP001
    where ACCT_MKT_UN_ID in ('C', 'D', 'F', 'G', 'I',
    'L', 'O', 'P', 'R', 'S', 'V', 'W')
    Im concerned about the NEXT TRUNC(SYSDATE+1) + 6.5/24 part. It says the snapshot refreshes every day at 6:30 am.
    I need to schedule the refreshes every day except Saturday and Sunday. Got any idea how can I do that?
    Prash

    You would probably want to use the dbms_job package to schedule the refresh in that case, rather than scheduling the refresh in the materialized view creation. Write a function that returns the next refresh time for your snapshot and pass that in when you create your job.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to change Refresh Time in  a Discoverer Portlet?

    Hi,
    I have added a discoverer portlet to my main portal page. The minimum refresh time for the discoverer page i could set is 1 hour. Is there any way i could change it to 1 min as this is getting real time data in the database which i would like to display immediately.
    Any help/suggestion is most welcome. Thanks in advance.
    Regards
    Goutam

    Hi, i have the same problem.
    i have searched both metalink and here but found nothing .. doesnt anybody know how to change the discoverer portlets refresh time interval anything other than 1 hour,1day,1week etc. (they are the only options available)
    Any help would be appreciated.

  • How to track Snapshot refresh error

    Hi
    I have a procedure which is doing the below transaction one after one:
    1- Refresh snapshot Snap1
    2- track snapshot refresh status If Ok do step 3 if not exit
    2- Insert agregate data from snapshot Snap1 to table
    3- Track insertion status if Ok proceed on next steps if not exit
    3- commit
    To refresh the snapshot here is the syntaxe i want to use.
    DBMS_SNAPSHOT.refresh('Snap1','F');
    If refresh ok then
    insert into T1 select ..... from Snap1;
    commit;
    end if;
    Thank you.

    I try to show/hide a div depending on the occurence of errors. I resolved this problem by doing this in javascript.
    function showEdu(){
    $("#edu").animate({ height: 'show', opacity: 'show' }, 'slow');
    $s('P6_EDU_SHOWN','Y');
    function hideEdu(){
    $("#edu").animate({ height: 'hide', opacity: 'hide' }, 'slow');
    $s('P6_EDU_SHOWN','N');
    function checkEduError(){
    if($("span").hasClass("errTxt") == true)
    {showEdu();}
    else
    if($v('P6_EDU_SHOWN') == 'Y')
    {showEdu();}
    else
    {hideEdu();}
    }

  • Snapshot Refresh

    Hi.,
    I am facing following error on during the snapshot refresh at 8i
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 2
    ORA-02085: database link RT.PRDU connects to RT
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 617
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 674
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 654
    ORA-06512: at line 1
    Provide me the suitable solution.
    Thanks in advance.

    Try to solve the following error :
    ORA-02085 database link string connects to string
    Cause: The database link attempted to connect to a database with a different name. The name of the database link must be the same name as the name of the database.
    Action: Create a database link with the same name as the database to which it connects.
    What's the name of the dblink ?
    Nicolas.
    Message was edited by:
    N. Gasparotto

  • ORA-12008: error in snapshot refresh path

    I am getting this error even i am specifying to use other rollback segment
    ALTER ROLLBACK SEGMENT R02 SHRINK;
    SET TRANSACTION USE ROLLBACK SEGMENT R02;
    alter materialized view PAY_REV_BREAKUPWITHWOFF NOLOGGING;
    BEGIN dbms_mview.refresh('PAY_REV_BREAKUPWITHWOFF') ; END;
    ERROR at line 1:
    ORA-12008: error in snapshot refresh path
    ORA-01562: failed to extend rollback segment number 1
    ORA-01628: max # extents (505) reached for rollback segment SYS_RBS
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 617
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 674
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 654
    ORA-06512: at line 1

    The reason why it's still using SYS_RBS seems to be that since you are refreshing a materialized view, it might be doing parallel DMLs. In this case the clause of specifying a particular rollback segment is ignored.
    In addition to the above, try taking the rollback segment offline by executing
    alter rollback segment SYS_RBS offline;
    and then drop it by running
    drop rollback segment SYS_RBS;
    Then create new one and see if it works.
    if the above mentioned doesn't work somehow...
    try to change the extents storage parameter by running
    alter rollback segment sys_rbs storage (MAXEXTENTS 1000);
    Can't be sure as i currently don't have access to my system
    Hope this helps
    Message was edited by:
    thrilller

  • UNDO SPACE DURING SNAPSHOT REFRESH

    Hi All,
    I am seeing a weird issue with mu undo space in oracle 10g 10.2.0.3.
    Problem is ....
    I am doing a complete snapshot refresh from a remote database to source database. When I do this the snapshot refresh is consuming my all undo, I can see this by executing
    select distinct segment_name,sum(bytes)/1024/1024/1024 from dba_segments where tablespace_name='UNDO_TBS' group by segment_name;
    SEGMENT_NAME SUM(BYTES)
    _SYSSMU16$                    39.931324
    My total undo space is 40GB
    Why the snapshot refresh is consuming all the undo. Any idea? Appreciate your help.

    Hi,
    You can use the undocumented parameter "_mav_refresh_consistent_read" - refresh materialized views using consistent read snapshot (it will reduced the undo log issues).
    The Basic problem is "ATOMIC_REFRESH" is true or enable. try to make it false and check
    ATOMIC_REFRESH=>false
    Example :- execute DBMS_MVIEW.REFRESH(''view_name,'C’,ATOMIC_REFRESH=>false);
    - Pavan Kumar N

  • Changing default refresh time for the UWL.

    Hello,
    I am trying to change the Default refresh time for the UWL(workflow inbox) for all the users before they personalize or save the refresh time, Would changing the refresh time in the .xml file work or is there any other way to do it? Thanks,
    Aniketh R.

    We have had all sorts of issues with this as well. I have been unable to find a solution that works as of yet. From my own debugging it seems as if RP is trying to parse the pasted text as logo's, fields etc.... I am looking at potentially using a script w/ set interval to "clean" the clipboard data but this isn't a perfect solution for numerous reasons.
    What is happening to your letters when the users paste? Our letters actually become unusable after a plugin save. So I am actually very interested in the answer to this question!

  • Input Form/Reports Refresh time

    Hi all,
    We have input form/reports which takes about 45 seconds to refresh which is ok for the first time but the frustration from the user community is that every subsequent refresh also takes 45 seconds for even a small change. Is that possible to reduce time on the subsequent refresh time?
    Please share.
    Thanks,
    D

    Hi Devang,
    Refresh means that all data on the form have to be read from database. You can play with user settings: Refresh only Expanded and Inserted Members; Refresh only Data on "Save & Refresh Data", but not sure it will help.
    In general, the initial refresh for 45 seconds is a bit long. Do you have not default measures and dimension member formulas in the report?
    Vadim

  • Device Default Refresh Time

    I was wondering what the default refresh time is for ZCM 11.2.4 MU 1?
    Is there a recommended time that we should be setting this too?
    Currently we are set at 2 hours, for a partial refresh, and 12 hours for a full refresh.
    Has anyone seen/recommend that those settings should/could be adjusted to allow for faster refreshes?
    Thanks,
    -DS

    That will "Slow Down" the refresh rate, but may speed logon times.
    Unchecked, means it would check immediately and not delay to speed logons.
    The Default delay is 5-6 minutes.
    If you want new assignments to appear more quickly throughout the day,
    you need to lower the partial and/or full refresh.
    Partial Excludes Bundles but is everything else.
    Full is everything.
    Since Bundles may be want most interests some customers, I have seen
    some have just turned off Partial and only do full at an increased
    frequency.
    Monitoring performance is important as you decrease the interval.
    On 3/5/2014 1:56 PM, dschaldenovell wrote:
    >
    > Good day,
    >
    > We have now checked the box for Timed Refresh : Random Time to Wait :
    > setting the following : Minimum: 60 seconds Maximum 75 seconds Full
    > refresh Schedule 0 days 12 hours 0 minutes and Partial Refresh Schedule
    > 0 days 2 hours 0 minutes
    >
    > Previously this was unchecked and the values were grayed out but read 60
    > seconds and 75 seconds respectively
    >
    > We are going to be asking the staff to test
    >
    >
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Technical Support Engineer
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.

  • How to find total refresh time of Materialize view?

    Hello All,
    I want to know the total refresh time of Materialize view. i m refreshing MV by below statement
    i hv not logging the start and end time of this in process.
    exec dbms_mview.refresh('EMP_MV','C','',FALSE,FALSE,0,0,0,TRUE);
    So, anybody can you please know the using which database table it cab be possible?
    Thanks in advance

    The only way you can log the refresh time for each execution is to wrap the call inside a procedure that also logs the start and end times to a logging table.
    (if you manually run the exec dbms_mview.refresh from an SQLPlus command line, you could also SET TIMING ON in SQLPlus)
    Hemant K Chitale

  • How do I speed up the email refresh time on my Mac ? iPad and IPhone almost a minute or more faster using same connection?

    How do I speed up the email refresh time on my MAC?

    Hi ToddSATX, 
    Thank you for contributing to the Apple Support Communities. 
    It sounds like you receive email a few minutes faster on your iOS devices than on your Mac. This may be normal behavior, although there are a few settings that you can check if the delay is longer than that. 
    If you have a portable Mac, you may notice an improvement when it is connected to the power adapter. You can also select "Use IDLE command if the server supports it" from Preferences > Accounts > Advanced in the Mail menu (at the top left of the screen).
    You can find this information here:
    Mail (Yosemite): General preferences
    Check for new messages
    When Mail gets new messages from the mail server. By default, the option is set to Automatically (Mail varies how often it gets messages, based on whether your Mac is plugged into an electrical outlet). 
    An IMAP account may get messages more frequently if the mail server supports the IDLE command; make sure the option to use it is selected in the account’s Advanced pane in Mail preferences. 
    If you set the option to Manually, click the Get Mail button  in the Mail toolbar to check for messages. (Whenever you click an IMAP or Exchange mailbox, it syncs with the server, and shows new messages.)
    Best Regards,
    Jeremy 

Maybe you are looking for

  • How do I connect to the internet with Airport Expess?

    In Airport Utility I get an orange icon and the Airport Express light is green. In the internet box coming from the globe picture it says Interent connection Disconnected and there is no router address and no DNS server information shown.

  • HT3728 I have forgotten my password. How do I reset for a new password to update my airport base station.

    My Airport Base Station needs to be updated & asks for my password. I did not set it up & can't remember the password. How do I reset my password for my Airport Base Station? This is causing me problems.

  • Cannot install Crystal report 2008

    Dear All, I am trying to instal CR_2008_SP01_for_B1 on my PC. I got a screen said "please wait while the installer finishes determining your disk space requirements" forever. If I hit cancel, it will cancel the installation. So it looks like the inst

  • SCOM 2012 R2 agent upgrade fails crippling agents

    Running into a large amount of SCOM agents that are failing the upgrade from 2012 SP1 to R2 and would appreciate any feedback from my SCOM community colleagues.  Warning this issue is not for the faint of heart.  Plan: I am in the process of upgradin

  • Cannot run FOD Application

    I downloaded Jdev 11g and followed instructions for [Oracle Fusion Store Front Demo Application|http://www.oracle.com/technology/products/jdev/samples/fod/index.html]. The schema and sample data is installed successfully. I am able to compile and bui