How does materialized view work when refresh the view vs create the view?

I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
Could anyone please let me know how would this happen? Thanks,
Code looks like as following
create materialized view MY_MV1
refresh force on demand
start with to_date('20-02-2013 22:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate)+1+22/24
as
( SELECT Nvl(Cr.Sol_Chng_Num, ' ') AS Change_Request_Nbr,
       Nvl(Sr.Sr_Num, ' ') AS Service_Request_Nbr,
       Nvl(Sr.w_Org_Id, 0) AS Org_Id,
       Fcr.rowid,
       Cr.rowid,
       Bsr.rowid,
       Sr.rowid,
       SYSDATE
  FROM [email protected] Fcr
INNER JOIN [email protected] Cr
    ON Fcr.w_Sol_Chng_Id = Cr.w_Sol_Chng_Id
INNER JOIN [email protected] Bsr
    ON Fcr.w_Sol_Chng_Id = Bsr.w_Sol_Chng_Id
INNER JOIN [email protected] Sr
    ON Sr.w_Srv_Rec_Id = Bsr.w_Srv_Rec_Id
WHERE Sr.Sr_Num !='NS'
);I have tried to use dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) but it still took 141 mins to run... vs 159 mins without atomic_refresh=>false
Edited by: 986006 on Feb 20, 2013 2:15 PM

Welcome to the forum!
Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION)
>
I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
>
What Oracle version are you using? The 'atomic_refresh' parameter default was changed to TRUE starting with 10g.
See the PL/SQL Packages and Types doc
>
atomic_refresh
If this parameter is set to true, then the list of materialized views is refreshed in a single transaction. All of the refreshed materialized views are updated to a single point in time. If the refresh fails for any of the materialized views, none of the materialized views are updated.
If this parameter is set to false, then each of the materialized views is refreshed in a separate transaction.
>
What that means is that if the value is TRUE Oracle uses a DELETE to remove the existing rows. If the value is FALSE then Oracle uses TRUNCATE.
If you really are using the FALSE setting you should not be seeing that much of a time difference between creating the MV and a complete refresh so something else must be going on.

Similar Messages

  • How does time machine work when being used with a mac pro?

    How does time machine work when backing up a mac pro?
    Considering the fact that the mac pro can hold 8TB and a external (non NAS) hard drive can hold only 2TB does time machine only backup the OS disk.

    macnewcomer22 wrote:
    Considering the fact that the mac pro can hold 8TB and a external (non NAS) hard drive can hold only 2TB does time machine only backup the OS disk.
    Time Machine will backup everything by default, on every disk in your Mac.
    Choose System Preferences > Options to exclude items. You could exclude everything except your OS...but I'd think it is your data that's more important to you, if you have to make choices.
    See...
    http://discussions.apple.com/thread.jspa?threadID=1964018
    While it's true you can store almost 8TB, how much do you think you'll actually store? If you have 1TB of data you want to store then a 2TB drive can do it. Also when your TM drive begins to get full it will begin deleting the oldest backups to make room.
    You could also get a Drobo with 8 bays...
    http://www.drobo.com/products/index.php
    -mj

  • The attached VI works when I run it initially creating the XML file, but when run after the XML file is created, it's not updated. What am I doing wrong?

    The attached VI works when I run it initially creating the XML file, but when I change data and run after the XML file is created, it's not updated with new data. What am I doing wrong?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    Attractive Force XML.vi ‏23 KB

    That looks like the logic which was written into the VI
    Inner true/ false case:
    (file exists : false) write to XML file, unflatten for display
    (file exists : true) read from XML file, unflatten for display
    At no time when the file exists (true case) is the XML file updated...

  • How does a delta work when BW is the source?

    Greetings to All,
    We are loading from R/3 into DSO1, and then from DSO1 into DSO2.  The R/3 extractor that loads DSO1 is delta-enabled.  We are not sure, however, if a delta mechanism governs the load from DSO1 into DSO2.  The DTP says its extraction mode is delta, but does that mean, if a row in DSO1 changes, it will negate the key figures on the  original row and send a new row the way R/3 does?
    For example, suppose the R/3 extractor sends us Row 1. 
    Row 1 has a key figure with a value of $100.
    Row 1 gets changed in R/3, and the new value is $125. 
    The R/3 delta mechanism takes care of this by negating the key figure on the appropriate row and sending us a correcting row.  For example, the R/3 extractor will send us:
    Row 1 $100
    Row 1 -100
    Row 1 $125
    So... the net value in DSO1 is correct, i.e. 100 - 100 + 125 = 125. 
    When we load from DSO1 into DSO2, however, do you know what rows will load into DSO2?  Is BW "smart" enough to do this type of negation?
    Thanks! 
    Regards,
    Sarah-Jane

    The R/3 delta mechanism takes care of this by negating the key figure on the appropriate row and sending us a correcting row
    The function of negation is not done by R/3 rather by BI with use of before and after images in ODS. R/3 sure does send us the changed records but not the associated negation values in a new row. So if Bi can handle delta with one ODS, sure it can handle others too.
    http://help.sap.com/saphelp_bw33/helpdata/en/10/54853b175d214ee10000000a11402f/content.htm
    Message was edited by:
            voodi

  • How does installing programs work when user folder moved to separate drive?

    Hi everyone
    I have my user folder on a separate drive from my boot drive.
    I have set up a new installation of OS X on a third drive and pointed the main account's user folder on that third drive to the user folder drive.
    This means that the dock that shows up when I boot off that third drive contains aliases linking to programs on the ordinary boot drive.
    If I install programs on the third drive and make aliases in the dock, will that cause a conflict when I boot off the ordinary boot drive?
    And if I remove from the dock aliases linking to the ordinary boot drive, will they then disappear when booted off the ordinary boot drive?
    Thanks for any insight.
    /p

    I tried that.
    1) I created a standard user account called "Test."
    2) While logged in as Test I edited the sidebar. Then I logged out and back in again to confirm that the settings were retained. They were.
    3) While logged in as Test I copied the user folder from SystemDisk/Users/Test to DataDisk/Users/Test.
    4) I logged out of Test and logged in as Admin.
    5) I changed the home directory for the Test account to /Volumes/DataDisk/Users/Test.
    6) I deleted the directory at SystemDisk/Users/Test.
    7) I logged out of Admin and logged in as Test.
    8) I edited the sidebar. Then I logged out and back in again to see if the settings were retained. They were not.
    9) I repeated steps 3-7, this time moving the home directory back to its original location at SystemDisk/Users/Test.
    10) Again I edited the sidebar, logged out and logged back in again. This time the settings were retained, just as they had been before I moved the directory in the first place.
    Since the functionality returns when I move the home directory back to the system disk, I've concluded that it is not due to any corruption of library files or such. It seems to be a problem with the location of home directory.
    V.K., in your configuration, is the account with the moved home directory an Admin account or a Standard account? I have not tested this with an admin account and I suppose that might make a difference.

  • How does nat selectoin work when more than one nat command?

    My router's configuration contains two ip nat inside source commands with route maps. One command is a static translation and one is a dynamic. Is this the way processing works:
    The inside packet source address is processed against one of the command's route map (which command?). If that route map permits the address, then the source address is natted.
    However, if the first route map denies the address, then the router continues on to the second ip nat inside source command and processes the address against its route list.
    Right?

    Hi
    Basically yes, the router will compare the packet against all route-maps until it finds a match (if any) and then apply the NAT.
    If you think about it logically it shouldn't matter which order it applies them because if you are statically mapping one address to another you would ensure that this address is never matched in your dynamic NAT setup otherwise you could get very unpredictable results.
    HTH
    Jon

  • How does clamshell mode work when connected to monitor?

    I have connected my MacBook via the external port to an HD TV and can 'mirror' the screen image. I want to close the lid and continue to use the TV monitor but the MacBook insists in going to sleep...  What can I do or is this not possible?  Ideas anyone?

    Also has to be plugged into a power source. Read here:
    http://support.apple.com/kb/HT3131

  • How does home sharing work between your computers?

    How does home sharing work between computers?

    With any luck, the following document may be of some assistance:
    Understanding Home Sharing

  • I needed to install a previously purchased CS6 versus on new computer. To do this, I had to download a version from CC. I will not be using CC. How do I activate Photoshop under my license so that it does not stop working when I am out of communication ra

    I needed to install a previously purchased CS6 versus on new computer. To do this, I had to download a version from CC. I will not be using CC. How do I activate Photoshop under my license so that it does not stop working when I am out of communication range a month from now?

    The CC version will not activate with your perpetual CS6 license. Download the version from here:
    http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
    Your number should work with this version.

  • With my new macbook I attempted to open an older spreadsheet and get the following error message:  "This spreadsheet cannot be opened because ti is too old.  To open it, save it with numbers '09 first"  So how does one do this when I only have ver3.1?

    With my new macbook I attempted to open an older spreadsheet and get the following error message:  "This spreadsheet cannot be opened because ti is too old.  To open it, save it with numbers '09 first"  So how does one do this when I only have ver3.1?

    Numbers 3.x can only open Numbers '09 and later.  You will need Numbers '09 to open Numbers '08 files.
    If it is a single file (or only a few) you can email me and I will open and convert then email back.  My email address is in the "Biography" of my profile.
    You may have Numbers '09 installed.  Look in the folder "/Applications/iWork '09"  if Numbers is in that folder launch it, open the file you tried to open, and save.  Then you should be able to open in Numbers 3.x

  • Why does fix capitalization work when there is only one space after the period in pages 09?

    why does fix capitalization work when there is only one space after the period in pages 09?  For example:  "Turn on 3rd St. After the traffic light."  There is only one space after the period in "St."  shouldn't it only auto correct after TWO spaces..??  the word After, should be after..

    You may also use a noBreak space after the period at the end of the abbreviation.
    If I remember well, in such case the capitalization will not apply.
    Yvan KOENIG (VALLAURIS, France) mercredi 27 avril 2011 23:34:46

  • How does mackeeper 2012 work? and what is the benefit? is that same with kaspersky for windows? tks

    How does mackeeper 2012 work and its benefit? Is that same with Kaspersky for windows?

    Good, be sure not to use their uninstaller, which can cause more havoc, use the instructions in my first link.
    Real shame they can advertize this junk on most every Mac site!
    ClamXAV, free Virus scanner...
    http://www.clamxav.com/
    Free Sophos...
    http://www.sophos.com/products/enterprise/endpoint/security-and-control/mac/
    Little Snitch, stops/alerts outgoing stuff...
    http://www.obdev.at/products/littlesnitch/index.html

  • Does FaceTime still work when you're browsing the Internet simultaneously

    Does FaceTime still work when you're browsing the Internet simultaneously on your phone?

    triptifromsan francisco wrote:
    Does FaceTime still work when you're browsing the Internet simultaneously on your phone?
    iOS: Using FaceTime - Apple Support
    in my experience with facetime, you can't browse other apps or features while on a facetime video call.

  • How does vendor determine if no info record is maintained for the material

    how does vendor determine if no info record is maintained for the material

    Hi
    If you have to determine a vendor, the minimum requirement is Info record. Beyond that, you can ofcourse maintain Source Lists, Quota Arrangements but Info record is bare minimum for automatic determination of vendor.
    Otherwise, you have to maintain the vendor manually in th Purchasing docs.
    Tcodes for Info record are ME11, ME12, and ME13.
    Hope this clarifies.
    Thanks

  • How does SUM actually works

    Hi,
    I'm puzzled by how SUM actually works.
    I've got a table with the following fields:
    SET_OF_BOOKS_ID NOT NULL NUMBER(15)
    SUMMARY_CODE_COMBINATION_ID NOT NULL NUMBER(15)
    DETAIL_CODE_COMBINATION_ID NOT NULL NUMBER(15)
    TEMPLATE_ID NOT NULL NUMBER(15)
    LAST_UPDATED_BY NOT NULL NUMBER(15)
    LAST_UPDATE_DATE NOT NULL DATE
    ORDERING_VALUE NOT NULL VARCHAR2(25)
    Using the below, I was able to get the total value of all the ordering value.
    select sum(ordering_value) from gl_account_hierarchies where set_of_books_id = 1 and summary_code_combination_id = 1147;
    I was happy that I could get the total value but am puzzled as ordering value is of data type VARCHAR2.
    Is sum(ordering_value) a VARCHAR2 or a NUMBER then?
    I did a simple test, inserting the following record:
    insert into gl_account_hierarchies values(1,1024,1,2,3,'11-APR-2002','xyz');
    After committing, I double check by using the following statement:
    select * from gl_account_hierarchies where last_update_date = '11-APR-2002';
    and was able to retrieve the newly inserted record.
    But when I did another check with the following statement:
    select * from gl_account_hierarchies where set_of_books_id = 1 and summary_code_combination_id = 1147;
    I wasn't able to retrieve the newly inserted record.
    Why is that so? How does SUM actually works? Is the output of SUM a VARCHAR2 or NUMBERIC value?
    thanks in advance!!
    Yu S.S

    SUM() gives a number.
    What you have come across is an implicit data conversion. Basically the SQL parser doesn't reject your query as being syntactically invalid just because you're attempting a mathematical function on a non-numeric column. Instead when you execute your query SQL substitutes this
    select sum(to_number(ordering_value)) from gl_account_hierarchies where set_of_books_id = 1 and summary_code_combination_id = 1147;
    If you want to check this create a view
    create order_value as select sum(ordering_value) sum_val from gl_account_hierarchies ;
    and then desc it.
    Cheers, APC
    SUM(

Maybe you are looking for

  • How do I stop all my Apple devices from being connected ?

    I screwed up when I set up my apple devices and now they all ring when one is dialed. I can't remember how do reverse this. Seems like I've done this before

  • Why is my word and pdf files so large? How can I reduce the size?

    My document contains mostly photos from a database via a path to the actual jpeg photos on disk. There are 39 jpeg photos + a small amount of text with each photo. The 39 jpeg photos on the disk add up to be 5.79 mb. If I export the crystal reports d

  • Should I be able to browse to /WEB-INF/whatever?

    All the documentation I can find says that files and folders underneath the /WEB-INF directory should, by default, be inaccesible to someone browsing my site. Any attempts to access these files or folders should return a "404 - File Not Found". Howev

  • Is anyone here using RAGE to host your website?

    They are a software company that is now hosting websites. I've been looking at this company for my website, they say they work with iweb users, I never heard of them before and was wondering if anyone has any opinion. I been hosting my website with m

  • Element Missing in Workflow Container

    Hi, I am facing a strange issue. I am not finding a particular element in workflow container (both in the Container tab and also in Basic data->Workflow Builder->Workflow container->Element (R/3 4.70 Enterprise)) but at runtime - SWI1 (Workflow Log)