Exchange partition taking so long?

Hello


Oracle 11.1.0.7 version.

Why partition exchange took 10 minutes longer?

Here is my code

Table TAB is siloed single list
 CREATE OR REPLACE PROCEDURE load_tab;
   IS
      
      starttime   NUMBER;
      endtime     NUMBER;
      BEGIN
 BEGIN     


EXECUTE IMMEDIATE 'TRUNCATE TABLE TAB_TEMP;'

-- Dropping the index on temp table

 EXECUTE IMMEDIATE 'DROP INDEX TAB_TEMP_IDX01';
 
 BEGIN
 INSERT /*+ append */ INTO TAB_TEMP
 Select col1,col2,...coln from table1@DBLINK1,table2@DBLINK1,table3@DBLINK1 where join conditions;
 
 commit;
 END;
 
 EXECUTE IMMEDIATE 'CREATE INDEX TAB_TEMP_IDX01 ON TAB_TEMP
 (COL1)
 NOLOGGING
 TABLESPACE CSP_INDX
PARALLEL';
 
 
  Gathering stats on temp table;
 
 
 EXECUTE IMMEDIATE 'TRUNCATE TABLE TAB';
 
  starttime := SYS.DBMS_UTILITY.get_time;


 EXECUTE IMMEDIATE 'ALTER TABLE TAB  EXCHANGE PARTITION p1  WITH TABLE TAB_TEMP  WITHOUT VALIDATION UPDATE GLOBAL INDEXES';

  endtime := SYS.DBMS_UTILITY.get_time;
  
  
  logging total time taken for partition exchange on a log table ((endtime-statrtime)/100));


EXECUTE IMMEDIATE 'TRUNCATE TABLE TAB_TEMP';


EXCEPTION Block;

END;

END load_tab;
Please let me know why partiton Exchange taking so long? here a few times it takes 30 minutes and some time 10-15 minutes.



I was under the impression that the exchange of partion is nothing but the update of the data dictionary. Please clarify my doubt?




Thank you
Mike

If you don't have a comprehensive index on the partition table, but only local indexes, then more of the optimal approach is:

(1) create the staging table (similar to the partition table)

(2) double local indexes on the table to partition in the staging table

(3) an exchange of partition table using alter table... swap partition.. with table... including the index without validation

Such an exchange of partition must be second - as sole owner of the materials are exchanged and no treatment/audit/additional validation isn't required.

Of course, the assumption is that the intermediate table has valid data for the content of the partition it will replace.

Tags: Database

Similar Questions

  • Why my partitioning process taking so long? (I've waited 1 day it ends)

    Why my partitioning process taking so long? (I've waited 1 day it ends). Please help me, your help is very appreciated.

    1. Please disconnect from external storage. You use a USB Installer?

    2 use wired network connection, if possible.

    3. What is the version of Windows that you are trying to install?

    4. what version of Mac OS X on your Mac?

  • stop taking too long after upgrade sierra - about 20 minutes

    After upgrading to Mac OS sierra, does take about 20-25 minutes for the stop.

    After command to shutdown or restart, screen off, lights remain on for keyboard and apple logo.

    MacBook Pro (retina, 13 inch, mid-2014)

    I found the culprit. MySQL server taking too long to stop. But do not know how to fix it.

  • I tried to erase and reset my iphone 6 s. But why is it taking so long? For more than 24 hours. Is this normal? The phone displays just the apple logo and wont open. Help, please. Thank you in advance.

    I tried to erase and reset my iphone 6 s. But why is it taking so long? For more than 24 hours. Is this normal? The phone displays just the apple logo and wont open. Help, please. Thank you in advance.

    Hello

    Follow the instructions here:

    If you are unable to update or restore your iPhone, iPad or iPod touch - Apple supports

  • V10.11.3 OSX El Capitan taking a long time to open

    Why after update to OSX El Capitan v10.11.3 its taking a long time to open?

    Do you mean that it takes a lot of time for your computer to boot?  There could be several reasons for this.  Start by going to http://www.etresoft.com/etrecheck , download and run EtreCheck, copy paste here the status report.  It goes we will see what is currently on your system, and if there is something on this issue causing the extreme slowness of start-up, we see and advise you on what to do next.

  • Why does take so long to load from the time wherever I power up until it takes to get to the login screen? help taking too long

    Why does take so long to load from the time wherever I power up until it takes to get to the login screen? help taking too long

    You should take a look at your startup programs and decide what is really necessary and what is nothing more than useless clutter. There is nothing wrong with the startup programs, some may be really useful or even necessary for your personal needs. But keep in mind that many programs build to start when you start the computer and that most of them must not start when the computer starts, all they do is slow down your boot time and clutter of things when you're trying to solve problems, and some are downright harmful!

    I mean, have you really need things like real Planner and Gadwin Print Screen running all the time? These programs will run very well, even if they are not started automatically every time that you start the computer. Go to these programs and change/disable their boot option. Some may be difficult to kill for public assistance services can be useful when you try to control startup programs. Try CodeStuff Starter, it's safe and easy to use, I think you'll like it, download it here:

    http://CodeStuff.tripod.com/products_starter.html>

    Use AutoRuns to check axis start, Richard:

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx>

    Use Cclenar-> tools-> start

    http://www.CCleaner.com/download/builds.aspx>

    I can't tell you what to keep, startup items it is a personal preference, but pretty well all the startup items indicated by CodeStuff Starter are safe to disable, and changes are easy to reverse if you change your mind. Searches for items it shows you and decide whether or not these things are really useful or necessary. Some programs will be started at startup without your knowledge and over time, that list can expand to include useless parasites, part of good computer maintenance includes regular control of these startup items and the removal of the unnecessary.

    Suggest that you first spread malware as the cause of the problem by following these steps:

    I. - delete your temporary files

    Clean the system (compensation to all temp/tmp folders and included all the content offline, the tif browser, delete the cookies of compensation.)

    Do a disk cleanup. Click the Start button. in the search box, type disk cleanupand then in the list of results, click Disk Cleanup. Better and easier to use - ccleaner.

    Download the basic version (slim) via

    http://www.Piriform.com/CCleaner/builds>

    The basic version (slim) does not contain the toolbar disgusted

    DO NOT USE ANY cleaning of the advanced options. DO NOT TOUCH THE REGISTRY OR TOOLS. At least not for now.

    Reset

    II. - have your system scanned as a result of security/antivirus installed.

    III. - download, install, update and run both of these tools to a-squared free scans:

    MalwareBytes anti-malware (MBAM)

    http://www.Malwarebytes.org/products/malwarebytes_free>

    SUPERAntiSpyware (SAS)

    http://SUPERAntiSpyware.com/superantispywarefreevspro.html>

    UTC/GMT is 18:16 on Wednesday, January 18, 2012

  • computer Dell laptop under Vista Home Basic are taking too long to wake up from its sleep. __

    computer Dell laptop under Vista Home Basic are taking too long to wake up from its sleep.

    http://www.Vistax64.com/tutorials/63567-power-options-sleep-mode-problems.HTML?filter [11] = power % 20Management

    Read the info on sleep disorders in the tutorial above.

    http://www.Vistax64.com/tutorials/198047-power-plan-restore-default-settings.html

    Also read this tutorial; as well as the 'related links' at the bottom of the links above.

    See you soon.

    Mick Murphy - Microsoft partner

  • Partitioning of an existing Table using the EXCHANGE PARTITION

    Hi all

    I have one unpartitioned table I partitioned by Exchange, this table has several indexes and constraints (primary and foreign).

    ALTER TABLE notpart_table ADD (
        CONSTRAINT PK_KCESPITI PRIMARY KEY (K_CESP, TIPORD)
            USING INDEX TABLESPACE TBLS_CONTA,
        CONSTRAINT FK_KCONTO_CE FOREIGN KEY (K_CONTO) REFERENCES xxxx (K_CONTO));
    
    CREATE INDEX IX_NFATTURA_CE ON notpart_tab (ANNO_FATTURA, K_REGISTRO, K_REGFA, TIPORD)
        TABLESPACE TBLS_CONTA;
    
    
    
    
    

    after Create a partitioned Table Destination

    notpart_table2, I created the same constraints and indexes defined in notpart_table


    When I run


    ALTER TABLE notpart_table2
      EXCHANGE PARTITION PART_notpart_table2
      WITH TABLE notpart_table
      WITHOUT VALIDATION
      UPDATE GLOBAL INDEXES;
    
    
    
    

    I get: ora-02266

    Why?

    Thanks in advance for any help


    Post edited by: vigilant Rosario

    It is not exactly what you have. Very probably not partitioned table, you are partitioning is the parent to another table table:

    SQL > create table tbl1 (id number)
    2.

    Table created.

    SQL > alter table tbl1
    2 Add the constraint tbl1_pk
    3 primary key
    4.

    Modified table.

    SQL > create table tbl2 (id number)
    2.

    Table created.

    SQL > alter table tbl2
    2 Add the constraint tbl1_fk1
    3 foreign key
    4 references tbl1
    5.

    Modified table.

    SQL > insert into tbl1 values (1)
    2.

    1 line of creation.

    SQL > insert into tbl2 values (1)
    2.

    1 line of creation.

    SQL > create table tbl1_part (id number)
    2 partition by range (id)
    3 (partition p1 values less than (1000000))
    4.

    Table created.

    SQL >
    SQL > alter table tbl1_part
    Exchange 2 partition p1
    3 with table tbl1
    4 without validation
    5 update global indexes
    6.
    with table tbl1
    *
    ERROR at line 3:
    ORA-02266: permit to unique/primary keys in table referenced by foreign keys

    SQL >

    If so, of the foreign key and recreate it pointing to the partitioned table as parent after finished partitioning the table.

    SY.

  • Hi, I am Ganesh, I tried to installed the application using creative cloud. But seems it's taking too long to install the application and it is hit. After the installation of 42%. Still, I tried to restart my computer and re-install the application. But i

    Hi, I am Ganesh, I tried to installed the application using creative cloud. But seems it's taking too long to install the application and it is hit. After the installation of 42%. Still, I tried to restart my computer and re-install the application. But it is keep taking so long time and struck at the end of the installation of 42%.

    If the installation process is stalled at 42 percent with no possibility of error, there is a problem with the zipped file to Extraction of downloaded in the Temp folder.

    As a fundamental step. Leave the creative Cloud desktop application.

    Delete the contents of the Temp folder:

    Optional: it will be ideal to install software like Winrar, WinZip or 7-zip,., etc.

    Please press Windows + R and you will get a command window run, get hit and type %temp%.

    Delete all the content inside the temp folder.



    Then try again to install application InDesign CC again.

    Just in case, if you are still having the same issue.

    Creative application cloud thus released, do not close it.

    Open the Temp folder, then search for the CC InDesign installation file and copy it to the desktop computer.

    Then leave Creative Cloud application and try to install.

  • I have tried, using the, trial version, creative, cloud, I, signed, until and started, the, download, download, is taking a long time, so, I, decided to cancel, she and buy, year, plan, pay, mont hly., I, started, download, creative, cloud, once again, bu

    I, tried, using the, trial version, creative, cloud, I, signed, until and started, the, download, download, is taking a long time, so, I, decided to cancel, she and buy, year, plan, pay, mont hly., I, started, download, creative, cloud, once again, but, downloading, was interrupted, by, ma, firefighters dau, by inserting, key usb, peripheral, in , the, USB port. , Could, not, I believe, downloading, I, signed, in, adobe, and now, tells me, that I, a, 30, day, trial, My, account, shows, that I have, I, p helps, my, first of all, every month, slice, but, I can only use a, trial, version, who, says, goes, e arentheses, 30, days., which can, I, do, for, get, the full, each year, the intention, version?

    Jacobm51486856 please see in Sign, activation or connection errors. CS5.5 and later for more information on how to resolve the error of connection that prevents your membership being authorized.

  • What is the problem with this Forum? Why Adobe taking so long to reply to messages?

    What is the problem with this Forum? Why Adobe taking so long to reply to messages?
    It is in fact 'specific' Forum of Photoshop.
    I usually come back another Adobe forum responses quickly.

    Chime.

    Hi people,

    For what it's worth, there are several of us who try, in addition to our regular work, to keep an eye on two other forums.  Quite simply, we care about the product and try to make sure that we give our customers the best experience as possible.  Plus, what better way to hear about your weak points in order to solve them.  But, as Mylenium and Christmas as well stress this, the forums are officially a user experience.  If you need help fast or official, it isn't the best place to do it.

    Regarding your question of Arab, Rahzah, I answered in two different threads and would be happy to help you with your problem.  Please choose a single thread and stick with it. two tabs is a pain.

    Thank you
    David

    PS - some of us do check the forums on our time, as I did last week at the launch while I was on vacation.

  • How to find the lock and more information why the prg conc taking too long

    Oracle Apps R12-Orader management

    Hi all

    I am new to Oracle Apps, we I run my simultaneous program
    its taking too long to complete. How to find that there is a lock to produce in the table while that simultaneous execution of the program, another way to find why the simultaneous program takes too long to run and how can you speed up the process.

    Yesterday we made a few changes to speed up the process with our DBA to accelerate the simultaneous program

    The first simultaneous program takes 2 h 30 and after these changes taking 1 h 45. Please suggest it's okay

    Connected with the responsibility of the system administrator.

    Manager - set - Manager of the standard.

    Set the value of PROCESS like 15 (instead of 10).

    Set the value of SECONDS of SLEEP as 10 (Changed from 30).

    Manager - set - Manager2 Standard.

    Set the value of PROCESS like 15 (instead of 10).

    Set the value of SECONDS of SLEEP as 10 (Changed from 60).


    Any suggestion on how to find why it takes too much time.

    Any help is highly appricatable

    Thanks and greetings
    Srikkanth.M

    Hello

    I suggest you draw the simultaneous program and analyze the trace file. To do this, mark the simultaneous program as Trace enable (RESP system administrator, Menu simultaneous > program > define) and then run the program and download the trace file after dealing with tkprof. Check which are the staements who take most of the time and try to optimize them.

    It will be useful.

  • Exchange partition questions

    I'm about 10 gr 2.

    (1) is it possible to exchange the partition between two tables LIST partitioned? I know that it is possible to exchange the partition between a partitioned table and a non-partitioned table, but not sure on two partitioned table. One has done this?

    (2) if I run thereafter, what happens to SELECT those already underway on the table Partitioned P1? He will continue, or will be interrupted? My result will be based on the old data or exchanged data? i.e. read consistency apply in this case?

    ALTER TABLE T1 EXCHANGE PARTITION P1 with table T2


    Thanks in advance for your help.

    max71 wrote:
    I'm about 10 gr 2.

    (1) is it possible to exchange the partition between two tables LIST partitioned? I know that it is possible to exchange the partition between a partitioned table and a non-partitioned table, but not sure on two partitioned table. One has done this?

    No,
    You can exchange a simple table with a partition of a partitioned table.
    You can exchange a partitioned table (simple) whole with a single partition of a partitioned table composite. To move a partition of a partitioned table to another list, you will have to do a 'double-Exchange' (or worse).

    for example, to swap partition pX table pt1 with partition table pt2 pY:

    Create a simple table empty good shape T
    change the exchange table PT1 partition pX with table t.
    ALTER table Exchange partition with table T pY pT2
    change the exchange table partition pX with table T pT1
    Drop table T

    (2) if I run thereafter, what happens to SELECT those already underway on the table Partitioned P1? He will continue, or will be interrupted? My result will be based on the old data or exchanged data? i.e. read consistency apply in this case?

    ALTER TABLE T1 EXCHANGE PARTITION P1 with table T2

    In simple cases, the result will be correct. Oracle has introduced a form of "cross-DDL" read-consistency in Oracle 8.0 for exactly this reason. It is possible (although unlikely after so many years) you might find some bugs in there in complicated cases. I know that in the early days, I had some cases where the motions silently lose partitions after an Exchange and give erroneous results.

    The thing to watch is that data segments you renamed (and still need queries to see) does not get too wrote. For example, a query on T1 that began just before the Exchange that you quote above will want to see the data of the thing which is now table T2 - and it's possible. Even if you delete the table T2, the query can still finish safely. But if you drop T3 and then create a new object that replaces the hole left by T2, the application will crash when it starts to read this space with an error such as ORA-01410 invaliid rowid, or something similar.

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    http://www.jlcomp.demon.co.UK

    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Stephen Hawking.

  • Taking a long time to power laptop

    Hi all

    My laptop (HP ENVY 17 - j005tx Notebook) when to stop only takes a few seconds, but it can take up to 5 minutes to be able to...

    At first I thought some service or program took a long time to stop, I installed Windows 8.1 SDK Performance Toolkit to try to identify a culprit. run the command "shutdown - traceFlags BASE + DIAG + LATENCY - noPrepReboot xbootmgr-trace" and the generated trace succeffully.

    I noticed that the notbook was restarted in a matter of seconds...

    Anyway, I proceeded to analyze the trace file using the wpa.exe anf program cannot find any program or service taking much time to stop!

    SO, I now understand the operating system Windows stops well even if the laptop is very long take-off power.

    Someone at - it suggestions?  I have installed NVIDIA driver 337.88 and found another thread here where they suspected this version of the driver has not been tested by HP and after they have applied it their judgment of the laptop slower than usual--is this somehting, perhaps to look at...

    I am currently downoading sp63414.exe NVIDIA driver for my laptop - should I uninstall my current driver and applies HP?

    Jim

    Laptop HP ENVY 17-j005tx, HP ENVY 27 - k001a, HP ProLiant MicroServer Gen8 G2020T, HP MediaSmart EX495 Server tilt, HP MediaVault 2020, HP ENVY 120 AiO Printer

    Thank you visruth...

    What I've tried is run "msconfig" and boot into "safe mode", restarted, then stop, stop was back to normal again.

    Then revived "msconfig" disabled all Microsoft Services, judgment and yet all fed off the coast as usual (soon after).

    Then restarted and re-enabled all services using "msconfig".  Disabled the following services, choose these particular that I'm not sure why they should be executed and some do not know what they are...

    rebooted and then stop and everything stop and power off was normal...

    It seems that one of these services is at the origin of the power off to take a few minutes...

    I suspect the bluetooth services, GSService, or IconMan_R, or even the genius of Netgear...

    Funny enough I did uninstall netgear genius a few weeks ago and see for some unknown reason, that the Service is still there? Hmm...

    Jim

  • Recovery partition is no longer available.

    I had to use the partition for recovery/repair on my dektop PC (Vista home premium/SP2) who worked to solve my problem. However, it seems that this option is no longer available for me. The last time that I had a problem, I had to use my recovery disks and start over, which was a nuisance for your time. Is this normal, when you use this partition once, it becomes is no longer an option?

    Contact your computer manufacturer for information about the recovery Partition.

    This isn't their recovery process, Microsoft.

    See you soon. Mick Murphy - Microsoft partner

Maybe you are looking for

  • document.referrer returns the path of the page

    I have a page that is loaded through apps.facebook.com There are two ways that this page is accessible from: apps.facebook.com/ProductionPage apps.facebook.com/DevelopmentPage(Not the URL, just used for example) I used document.referrer to determine

  • Satellite L300D - SP5001 mast * one player does not recognize blank CDs

    Hi all System Specs:* Model: * L300D-SP5001* OS: * Windows Vista Ultimate 32 bit* Memory *: 4 GB* Processor *: AMD X 2 64-bit 1.9 Ghz (I know Im wasting resources with the 32-bit windows) * Problem: *.Blank CD is not identified by the system, which m

  • Revolve 810 Windows 8.1

    Hello I recently my elitebook revolution 810 (Gen1) upgrade Windows 8.1. Because the power supply fan continues blowing most of the time I have also upgraded to the latest version of the bios (f47). Now I have more features of the tablet on the devic

  • Windows media player cannot find the wmv file

    Windows media player cannot find the wmv file when it is attached to the email, but can't once downloaded to the desktop

  • HP Touch to pair cells of mouse (H4R81AA) economy mode

    Hello I don't know if anyone can help me, but I brought a HP Touch mouse (H4R81AA) of the pair & use in conjunction with a laptop running Windows 7 Professional operation.  I have configure everything with the mouse and laptop computer, and the mouse