Partition Exchange Loading (PEL)

Hi everyone,
I'm trying to set up a mapping in Oracle Warehouse Builder 9.0.4 to use Partition Exchange Loading.
When running, I get the warning: PELWarningRTV1003
Does anyone know what this message means, and where I can find information about such error messages?
Thanks for your help!
Best regards,
Ronald Ommundsen

The error means you are trying to swap a partition that still contains data in a configuration where OWB expects an empty partition. How did you set the "Replace existing data in Target Partition" configuration parameter?
Also, for more details on PEL, review the 10.19 to 10.27 pages of the user manual.
Regards:
Igor

Similar Messages

  • Problem in Direct Partition Exchange Loading(PEL)

    Hi all,
    I am facing a problem during execution of a OWB mapping. The map is using direct partition exchange loading. There are one source and one target table in the map. it is very simple.
    While the source and target are in the same schema there is no problem. But when they are in different schemas during execution a warning is given. That is:
    ResolveTableNameErrorRTV20006;BIA_RTL_INTERFACE"."SALE_SRC
    Here BIA_RTL_INTERFACE is source schema and SALE_SRC is source table.
    However the source record is going to the target table as required but the same record also exists in the same table after execution which is not desirable for direct PEL. So i think though the loading is done in target but it is not using the direct Partition Exchange Technique.
    Is there some kind of special privileage for Partition Exchange Loading when the source and target are in different schemas in the same database? Plase clarify this. Hope i can explain the problem. Waiting for reply.
    Thanks & Regards,
    Sumanta Das
    Kolkata

    The error means you are trying to swap a partition that still contains data in a configuration where OWB expects an empty partition. How did you set the "Replace existing data in Target Partition" configuration parameter?
    Also, for more details on PEL, review the 10.19 to 10.27 pages of the user manual.
    Regards:
    Igor

  • Partition Exchange Load in same schema

    Hi all,
    If my source and target tables are in different schema but table's structures are same. Can I apply Direct partition exchange load (PEL) in my mapping using OWB. Plz help me......
    Thank & Regards
    Soumen

    Hemant K Chitale wrote:
    Why not run a simple test with a dummy table, a few columns (plus a virtual column) and a few partitions ?
    Excellent suggestion.
    Shouldn't take more than about 30 minutes to create a test case - and if it takes more than 30 minutes the OP needs the practice anyway to get a better feel for the technology.
    Hint to OP: make sure you put some data in the "incoming" table, make sure you put some data in the "non-exchanged" partitions, remember to include a unique/pk constraint if you're expecting one on production, and run with sql_trace enabled to see what's happening in the background.
    Regards
    Jonathan Lewis

  • Virtual column and partition exchange load

    Hi All,
    Can someone tell me that if i have a virtual column on a table in 11g then can we load the data as partition exchange loading into the table.
    Thanks & Regards,
    Ankit Rana

    Hemant K Chitale wrote:
    Why not run a simple test with a dummy table, a few columns (plus a virtual column) and a few partitions ?
    Excellent suggestion.
    Shouldn't take more than about 30 minutes to create a test case - and if it takes more than 30 minutes the OP needs the practice anyway to get a better feel for the technology.
    Hint to OP: make sure you put some data in the "incoming" table, make sure you put some data in the "non-exchanged" partitions, remember to include a unique/pk constraint if you're expecting one on production, and run with sql_trace enabled to see what's happening in the background.
    Regards
    Jonathan Lewis

  • Partition exchange loading for specific subpartitions

    Hi All,
    Looking at an archive strategy - where we have to archive a specific dataset.
    Rather than a insert/delete routine - I was thinking of using partition exchange.
    The to-be archived table is interval range partitioned on date, with a list subpartition on country.
    It is for specific countries that I want to partition exchange.
        create table
        test_table
        (tbl_id number,
        country varchar2(2),
        sales_dt date,
        volume number)
        partition by range (sales_dt) interval (NUMTOYMINTERVAL(1,'Month'))
        subpartition by list (country)
        Subpartition template
        (subpartition p_ireland values ('IR'),
        subpartition p_france values ('FR'),
        subpartition p_other values (DEFAULT))
        (partition before_2008 values less than (to_date('01-JAN-2008','DD-MON-YYYY'))); The data loaded falls into the partitions and subpartitions correctly. All the partitions names are system generated.
    When I come to partition exchange for all the 'FR' subpartitions- I can't determine the logic.
    Using
        Alter table test_table
        exchange subpartition system_generated_name
        with table TEST_TABLE_ARCH;I can swap out a specific 'known' subpartition.
    I know you can use the 'for' logic with Oracle 11g but can't get the syntax to work.
    Any ideas?

    The error means you are trying to swap a partition that still contains data in a configuration where OWB expects an empty partition. How did you set the "Replace existing data in Target Partition" configuration parameter?
    Also, for more details on PEL, review the 10.19 to 10.27 pages of the user manual.
    Regards:
    Igor

  • RTV-20003: Warning: Cannot perform Partition Exchange Loading

    Hi,
    We have a unique situation in which the data has to be loaded 4 times each month to the fact table. The fact table is partitioned by month. We have configured the mappings so that DIRECT is false and REPLACE DATA option is also false (so that we don't loose exisiting data, if any). When the data is loaded to the fact for the first time then PEL is performed but when data is loaded for 2nd, 3rd and 4th time in the current partition OWB issues a warning (RTV-20003). We understand that in these cases data is still loaded but without using PEL. Is there any way to force OWB to perform PEL all 4 times without lossing the exisiting data in the current partition?
    Thanks, Yashu

    Hi, you can't use PEL to add data to an existing partition: by definition PEL swaps the rows in a regular, non-partitioned table with the rows in 1 partition of a partitioned table. Or better said, it swaps the table data segment with the partition data segment, and possibly the corresponding index segments if the indexes match and the part.table indexes are local. This means you are not really moving any rows so you can't add any to the partition using PEL.
    As a safety net, OWB provides "replace data = false" by default so you don't trash your data.
    If the 4 loads/month are 1 per week, you can consider creating e.g. 4 week partitions instead of month partitions. OWB PEL can't handle weeks: if you follow this route you should disable OWB PEL and exchange partitions 'by hand' inside a stored procedure called in the postmapping. This can be worth if you have really big volumes or if you want to feed your fact table very fast, staging new rows and then swapping them in almost instantaneously. You should evaluate your index rebuild speed requirements too.
    Hope this helps, Antonio

  • Partition Exchange Loading

    Have anyone had success with this feature in OWB? I've just attempted it but got an "ORA-12841: Cannot alter the session parallel DML state within a transaction". Is there a property somewhere to stop it from generating these alter sessions stmt?
    TIA
    Hong
    Environment:
    OWB version 9.0.2.62.3
    Oracle9i EE 9.0.1.3.0
    Solaris 2.7

    There is a number of restrictions when using Partition Exchange, please check these conditions are true:
    - The partition you are loading into is empty,
    - The index is local (i.e. every partition has it's own index),
    - All the data you are loading fits into the partition (this is a primary suspect in your case),
    - Loading tipe is INSERT (DELETE/INSERT, TRUNCATE/INSERT, CHECK/INSERT should work bu you can get warnings during generation),
    Regards:
    Igor

  • Partition exchange loading with a cube as target

    The owb does'nt generate pel-code, if we use a cube as the target of the mapping. There are no error messages, but the package does'nt contain the pel-code. If we use a normal partitioned table as the target, the codes is generated. Does anybody know if this (cube as a target of a pel-Mapping) is supported by the owb or wether we have to use a normal table.

    This sounds like a bug. PEL should at least inform users about why it doesn't show up. Please file an iTAR with Oracle Support and include a MDL file.

  • Disk Utility - Partition map needs repair because a data partition needs loader space.

    I just finished setting up both my OSX and Windows installs from scratch after fitting an SSD, which in-turn was right before my logic board died and Apple replaced it, now it looks like I have some sort of hard drive issue brewing.
    This was my plan for the SSD, and how it currently displays in Disk Utility although that wasn't the case earlier:
    And in Terminal:
    My intention was to have two boot partitions for each OS, 'Macintosh HD' and 'Win 7 Pro' and a third shared data partition 'Projects' on the SSD, which I made in Drive Genius after installing Boot Camp. I don't want Macintosh HD accessible from Windows because I'll be using Paragon HFS+ or MacDrive to give write access and don't want OSs stomping on other OSs turf, hence needing three partitions. Everything looked fine until I just checked Disk Management under windows and realised it couldn't see the Projects volume. Even though it's fine in OS X, it was just marked black/unallocated space.
    So I booted back into OSX, all my files look fine so I ran Disk Utility and the Partition tab looked really odd - unfortunately I didn't get a screenshot. All volumes reported their size correctly but visually, Macintosh HD took up most of the drive. I could see 'Windows 7 Pro' under this, but the Partition Layout section had a scrollbar, which if I scrolled down showed 'Projects' squished into a tiny gap at the bottom. I ran a Verify, which reported no problems, and at some time since the Partition Layout has reverted to how it should look (as in the screenshot above), with 'Projects' book-ended by "Macintosh HD' and 'Windows 7 Pro'.
    Now when I run a Verify on Macintosh HD or Projects volumes, it says there's no problem, but if I run one on the drive, I get this message:
    Volume Macintosh HD on disk0s2 has 0 bytes of trailing loader space and it needs 134217728 bytes
    Problems were found with the partition map which might prevent booting
    Error: Partition map needs repair because a data partition needs loader space.
    I've only managed to find one other mention of this error here, but the fix is not relevant to me because I don't have Sophos installed. I've tried Single User/Safe Mode but it just boots into normal mode, so I can't do a fsck -fy.
    ** /dev/rdisk0s2 (NO WRITE)
    Can't open /dev/rdisk0s2: Permission denied
    That value in bytes is exactly 128mb, so I suspect the problem lies with one of the invisible partitions that show up in iPartition and Disk Management under Windows, but not in Disk Utility. I have backups and I suspect the root of the problem is partitioning in iPartition after installing Boot Camp, but I've never had issues with this approach in the past so I'm wary of just giving up and reinstalling Windows again will be massive hassle because I no longer have a SuperDrive and last time it refused to install from USB.
    Anyone have any idea what's going on? It seems like the sort of issue Disk Utility should just handle, at least in Recovery mode, but it's not playing ball. It also doesn't seem like a massive problem since my files all look fine and performance is OK, so I'm reluctant to do anything major.
    I'll update with a shot of the drive in Disk Management from Windows in a few minutes, in case that sheds light on anything. Thanks!

    Similar issue here. I manually partitioned my hard disk for triple boot (using Gparted on Linux), then everything was just fine until I ran bootcamp, to do something as simple as create a boot USB.
    I get the same error as a result and have to work my way into booting, by resorting first to a Linux live USB, then restarting from the live USB, to finally reach my rEFInd boot manager, or whichever boot manager should be initialized at startup.
    I suppose that the cause in my case is that some operation "scratched" the protective MBR. See this:
    http://www.mactech.com/articles/mactech/Vol.23/23.03/APMtoGPT/index.html
    I am hoping to fix it using an external Yosemite installation media: see this guide -
    http://www.macworld.com/article/2367748/how-to-make-a-bootable-os-x-10-10-yosemi te-install-drive.html
    And as a last resort to reinstall.
    I'll admit I am negatively surprised. I need this computer for professional reasons, and for the sake of "preserving the integrity of OSX", measures defined by Apple instead tend to make partitions far easier to damage. And this problem seems to affect a number of users.
    As for what I have to go through to fix it: a 5GB download, during which I have to register my credit card to the Apple Store. "Pay first, get your free software next."
    IF Disk Utility can fix it, from the external media, then fair enough. The hassle is unpleasant but it files as "a choice".
    Otherwise you can file it safely under software design calamity.

  • Problem with public folder initialization on exchange load generator 2010

    hi,
    we need to make some stress charge for a migration between 2010 and 2013. Before that we need to populate our exchange 2010 lab with full mailbox and public folders. So we tried Exchange load generator 2010 for this task ( initialization only). 
    Loadgen did well for the mailbox but we have some problems with the public folders. we have an empty public folder database and the user we run loadgen with has organization admin and public folder management right. the problem is that when we run this command
    (for initializing public folder only, mailbox's done) :  
    loadgencmd.exe /p /c config.xml /add trace.log 
    IT create only one public folder with the user we run loadgen with, and 5-8 objects inside. We need that It create a public folder for each users it created before. Maybe we do not understand loadgen
    correctly...

    I found my solution :
    customize the <PublicStoreProfile> section in the configuration file as follows:
     <PublicStoreProfile>
        <MessageFiles />
        <TopLevelFolderCount>1</TopLevelFolderCount>
        <NonTopLevelFolderCount>1</NonTopLevelFolderCount>
        <MinimumFolderDepth>1</MinimumFolderDepth>
        <AverageFolderDepth>2</AverageFolderDepth>
        <MaximumFolderDepth>3</MaximumFolderDepth>
        <MinimumMessageCount>5</MinimumMessageCount>
        <AverageMessageCount>10</AverageMessageCount>
        <MaximumMessageCount>15</MaximumMessageCount>
        <UseOrdinalFolderName>false</UseOrdinalFolderName>
      </PublicStoreProfile>
    Simply put differents values for each variables.

  • Primary Key Causing Problem in Interval Partition Exchange

    DB : 11.2.0.2
    OS : AIX 6.1
    I am getting the problem while exchanging data with interval partitioned table. I have a interval partitioned table and a normal staging table having data to be uploaded.
    Following are the steps i am doing.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4))
                    PARTITION BY RANGE (ADMISSION_DATE)
                    INTERVAL (NUMTOYMINTERVAL(3,'MONTH'))
                    ( PARTITION QUAT_1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','DD-MON-YYYY')),
                     PARTITION QUAT_2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','DD-MON-YYYY')),
                     PARTITION QUAT_3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','DD-MON-YYYY')),
                     PARTITION QUAT_4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','DD-MON-YYYY')));
    Table created.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD ADD CONSTRAINT IDX_DEMO_ROLL PRIMARY KEY (ROLL_NUM);
    Table altered.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
           PARTITION_POSITION,
              TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (10,1,'12-MAR-2012',1000,90);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (11,5,'01-JUN-2012',5000,80);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (12,9,'12-SEP-2012',4000,20);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (13,7,'29-DEC-2012',7000,10);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (14,8,'21-JAN-2013',2000,50); ---- This row will create a new interval partition in table.
    1 row created.
    SQL> commit;
    SQL> SELECT TABLE_OWNER,
            TABLE_NAME,
            COMPOSITE,
            PARTITION_NAME,
            PARTITION_POSITION,
            TABLESPACE_NAME,
            LAST_ANALYZED
      FROM DBA_TAB_PARTITIONS
         WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS  
    SYS_P98 partition is added to table automatically.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD_Y (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4));
    Table created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD_Y VALUES (30,3,'21-MAY-2013',2000,12);
    1 row created.
    SQL> commit;
    Commit complete.
    Since, i need a partition in DEMO_INTERVAL_DATA_LOAD table, which can be used in partition exchange, so i create a new partition as below:
    SQL> LOCK TABLE DEMO_INTERVAL_DATA_LOAD PARTITION FOR (TO_DATE('01-APR-2013','DD-MON-YYYY')) IN SHARE MODE;
    Table(s) Locked.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
               PARTITION_POSITION,
               TABLESPACE_NAME,
               LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P102                                        6 USERS
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    ERROR at line 1:
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITIONNow, if i disable/drop the primary key constraint, it works without any problem.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD disable constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD drop constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    Table altered.
    SQL> select * from DEMO_INTERVAL_DATA_LOAD partition (SYS_P102);
      ROLL_NUM   CLASS_ID ADMISSION  TOTAL_FEE  COURSE_ID
            30          3 21-MAY-13       2000         12
    SQL> select * from DEMO_INTERVAL_DATA_LOAD_Y;
    no rows selectedPlease suggest.

    First, thanks for posting the code that lets us reproduce your test. That is essential for issues like this.
    Because the primary key is global you will not be able to use
    INCLUDING INDEXES
    WITH VALIDATION;And you will need to add the primary key to the temp table
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);The the exchange will work. You will need to rebuild the primary key after the exchange.

  • Explain plan changing after partition exchange

    I currently have a data warehouse where I use partition exchange to refresh the data. I'm finding that after a partition exchange of exactly the same data. explain plan changes.
    database 11.2.0.2
    To demonstrate what I'm doing I simplified the steps.
    first I gather stats on the table that will be exchanged and run explain plan
    exec dbms_stats.gather_table_stats( ownname=> 'IDW_TARGET', tabname=> 'PROGRAM_DIM' );
    Select
    FROM IDW_TARGET.ITD_MONTHLY_SUMMARY_FACT A,
    IDW_TARGET.GL_PERIOD_DIM B,
    IDW_TARGET.PROGRAM_DIM C,
    IDW_TARGET.RPT_ENTITY_DIM D
    WHERE ASST_SEC_CONCISE_NAME = 'abc'
    AND A.GL_PERIOD_KEY = B.KEY
    AND A.PROGRAM_KEY = C.KEY
    AND A.RPT_ENTITY_KEY = D.KEY
    AND B.PERIOD_YEAR >= 2006;
    ** uses FTS on fact table and runs in 20 seconds. **
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 25M| 71G| 47105 (1)| 00:09:26 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10003 | 25M| 71G| 47105 (1)| 00:09:26 | | | Q1,03 | P->S | QC (RAND) |
    |* 3 | HASH JOIN | | 25M| 71G| 47105 (1)| 00:09:26 | | | Q1,03 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 5 | PX RECEIVE | | 4551 | 1773K| 103 (0)| 00:00:02 | | | Q1,03 | PCWP | |
    | 6 | PX SEND BROADCAST | :TQ10000 | 4551 | 1773K| 103 (0)| 00:00:02 | | | | S->P | BROADCAST |
    | 7 | PARTITION RANGE SINGLE | | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    | 8 | TABLE ACCESS FULL | RPT_ENTITY_DIM | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    |* 9 | HASH JOIN | | 25M| 61G| 46999 (1)| 00:09:24 | | | Q1,03 | PCWP | |
    | 10 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 11 | PX RECEIVE | | 184 | 35696 | 5 (0)| 00:00:01 | | | Q1,03 | PCWP | |
    | 12 | PX SEND BROADCAST | :TQ10001 | 184 | 35696 | 5 (0)| 00:00:01 | | | | S->P | BROADCAST |
    | 13 | PARTITION RANGE SINGLE | | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    |* 14 | TABLE ACCESS FULL | GL_PERIOD_DIM | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    |* 15 | HASH JOIN | | 25M| 57G| 46992 (1)| 00:09:24 | | | Q1,03 | PCWP | |
    | 16 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 17 | PX RECEIVE | | 4085 | 6829K| 1334 (1)| 00:00:17 | | | Q1,03 | PCWP | |
    | 18 | PX SEND BROADCAST | :TQ10002 | 4085 | 6829K| 1334 (1)| 00:00:17 | | | | S->P | BROADCAST |
    | 19 | PARTITION RANGE SINGLE| | 4085 | 6829K| 1334 (1)| 00:00:17 | 1 | 1 | | | |
    |* 20 | TABLE ACCESS FULL | PROGRAM_DIM | 4085 | 6829K| 1334 (1)| 00:00:17 | 1 | 1 | | | |
    | 21 | PX BLOCK ITERATOR | | 71M| 45G| 45650 (1)| 00:09:08 | 1 | LAST | Q1,03 | PCWC | |
    | 22 | TABLE ACCESS FULL | ITD_MONTHLY_SUMMARY_FACT | 71M| 45G| 45650 (1)| 00:09:08 | 1 | 141 | Q1,03 | PCWP | |
    Predicate Information (identified by operation id):
    3 - access("A"."RPT_ENTITY_KEY"="D"."KEY")
    9 - access("A"."GL_PERIOD_KEY"="B"."KEY")
    14 - filter("B"."PERIOD_YEAR">=2006)
    15 - access("A"."PROGRAM_KEY"="C"."KEY")
    20 - filter("ASST_SEC_CONCISE_NAME"='abc'')
    drop table PELPROGRAMDIMALLDATA; -- Start fresh here and drop the partition that will be exchanged
    create table PELPROGRAMDIMALLDATA as select * from PROGRAM_DIM; -- going to use exact same data for partition exchange (only one parition)
    alter table PELPROGRAMDIMALLDATA add constraint CON_342 unique ("VALUE" ) using index ;
    alter table PELPROGRAMDIMALLDATA add constraint CON_343 primary key ("KEY" ) using index ;
    exec dbms_stats.gather_table_stats(ownname=>'IDW_TARGET', tabname=>'PELPROGRAMDIMALLDATA');
    alter table PROGRAM_DIM exchange partition ALL_DATA with table PELPROGRAMDIMALLDATA excluding indexes;
    ** rebuild indexes **
    ** explain plan for same statement uses nested loop**
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 2637K| 7514M| 33428 (1)| 00:06:42 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10003 | 2637K| 7514M| 33428 (1)| 00:06:42 | | | Q1,03 | P->S | QC (RAND) |
    |* 3 | HASH JOIN | | 2637K| 7514M| 33428 (1)| 00:06:42 | | | Q1,03 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 5 | PX RECEIVE | | 4551 | 1773K| 103 (0)| 00:00:02 | | | Q1,03 | PCWP | |
    | 6 | PX SEND BROADCAST | :TQ10000 | 4551 | 1773K| 103 (0)| 00:00:02 | | | | S->P | BROADCAST |
    | 7 | PARTITION RANGE SINGLE | | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    | 8 | TABLE ACCESS FULL | RPT_ENTITY_DIM | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    |* 9 | HASH JOIN | | 2637K| 6511M| 33324 (1)| 00:06:40 | | | Q1,03 | PCWP | |
    | 10 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 11 | PX RECEIVE | | 184 | 35696 | 5 (0)| 00:00:01 | | | Q1,03 | PCWP | |
    | 12 | PX SEND BROADCAST | :TQ10001 | 184 | 35696 | 5 (0)| 00:00:01 | | | | S->P | BROADCAST |
    | 13 | PARTITION RANGE SINGLE | | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    |* 14 | TABLE ACCESS FULL | GL_PERIOD_DIM | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    | 15 | NESTED LOOPS | | 2642K| 6035M| 33318 (1)| 00:06:40 | | | Q1,03 | PCWP | |
    | 16 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 17 | PX RECEIVE | | | | | | | | Q1,03 | PCWP | |
    | 18 | PX SEND ROUND-ROBIN | :TQ10002 | | | | | | | | S->P | RND-ROBIN |
    | 19 | PARTITION RANGE SINGLE | | 420 | 702K| 220 (0)| 00:00:03 | 1 | 1 | | | |
    | 20 | TABLE ACCESS BY LOCAL INDEX ROWID| PROGRAM_DIM | 420 | 702K| 220 (0)| 00:00:03 | 1 | 1 | | | |
    |* 21 | INDEX RANGE SCAN | PROGRAM_DIM_IX20 | 420 | | 3 (0)| 00:00:01 | 1 | 1 | | | |
    | 22 | PARTITION RANGE ALL | | 6299 | 4201K| 33318 (1)| 00:06:40 | 1 | 9 | Q1,03 | PCWP | |
    | 23 | PARTITION LIST ALL | | 6299 | 4201K| 33318 (1)| 00:06:40 | 1 | LAST | Q1,03 | PCWP | |
    | 24 | TABLE ACCESS BY LOCAL INDEX ROWID | ITD_MONTHLY_SUMMARY_FACT | 6299 | 4201K| 33318 (1)| 00:06:40 | 1 | 141 | Q1,03 | PCWP | |
    | 25 | BITMAP CONVERSION TO ROWIDS | | | | | | | | Q1,03 | PCWP | |
    |* 26 | BITMAP INDEX SINGLE VALUE | ITD_MONTHLY_SUMMARY_SK09 | | | | | 1 | 141 | Q1,03 | PCWP | |
    Predicate Information (identified by operation id):
    3 - access("A"."RPT_ENTITY_KEY"="D"."KEY")
    9 - access("A"."GL_PERIOD_KEY"="B"."KEY")
    14 - filter("B"."PERIOD_YEAR">=2006)
    21 - access("ASST_SEC_CONCISE_NAME"='abc')
    26 - access("A"."PROGRAM_KEY"="C"."KEY")
    exec dbms_stats.gather_table_stats( ownname=> 'IDW_TARGET', tabname=> 'PROGRAM_DIM' );
    ** explain plan for same statement uses full table scan**
    see first explain plan
    Since the stats were not gathered after the partition exchange I would imagine that they would still be used.
    Edited by: user12198207 on Feb 7, 2012 8:13 AM
    Edited by: user12198207 on Feb 7, 2012 9:47 AM

    Locking stats did not make any difference. Also, I deleted the stats at the global level leaving just partition stats and it continued to use the nested loop which takes 15+ minutes instead of 20 seconds with the FTS.
    In my original situation it listed the stats at the global level as stale after the partition exchange. But after I removed many of the steps and use just what's described in this posts.
    select * from dba_tab_statistics
    where table_name='PROGRAM_DIM';
    shows stale stats=no for both global and partition. Kind of unexpected. Further digging in shows that is just determined by a case statement.
    from dba_tab_statistics view ddl
    case
    when t.analyzetime is null then null
    when ((m.inserts + m.deletes + m.updates) >
    t.rowcnt *
    to_number(DBMS_STATS.GET_PREFS('STALE_PERCENT',
    u.name, o.name))/100 or
    bitand(m.flags,1) = 1) then 'YES'
    else 'NO'
    end

  • Partition Exchange Issue

    Hello,
    When I am trying to do a partition exchange between one unpartitioned and partitioned table I am getting the following error
    ORA-08103: object no longer exists
    The indexes of the two table matches. I donot know what caused this problem. Can you please help me in resolving this??
    Thanks
    Sathish

    Hi,
    Check Metalink for this.
    There are a lot of bugs related to this error.
    Also check this blog.
    Best Regards,
    Alex

  • Automating partition exchange

    I am looking to automate a partition exchange process because I am changing a column
    from a date to a timestamp.
    For each parition in a table I want to do the following steps:
    1. PEX: SRC_TBL to TEMP_TBL
    2. Make the date to timestamp change on the TEMP_TBL
    3. PEX: TEMP_TBL to DEST_TBL
    4. Prepare the TEMP_TBL for the next cycle - change the timestamp back to date
    CREATE OR REPLACE PROCEDURE test1.history_pex_proc
    (OWNER in VARCHAR2(25)
    SRC_TBL in VARCHAR2(25),
    TEMP_TBL in VARCHAR2(25),
    DEST_TBL in VARCHAR2(25))
    -- Table name and owner can be hard coded.
    for x in ( SELECT * FROM dba_tab_partitions WHERE
    table_name = SRC_TBL AND
    table_owner = OWNER)
    loop
    sql_stmt='ALTER TABLE OWNER.SRC_TBL EXCHANGE PARTITION x.partition_name WITH TABLE OWNER.TEMP_TBL WITHOUT VALIDATION;'
    execute immediate sql_stmt ;
    sql_stmt='ALTER TABLE OWNER.TEMP_TBL MODIFY(QUEUE_DATE TIMESTAMP(3));'
    execute immediate sql_stmt ;
    sql_stmt='ALTER TABLE OWNER.DEST_TBL EXCHANGE PARTITION x.partition_name WITH TABLE OWNER.TEMP_TBL WITHOUT VALIDATION;'
    execute immediate sql_stmt ;
    sql_stmt='TRUNCATE TABLE OWNER.TEMP_TBL ;'
    execute immediate sql_stmt ;
    sql_stmt='ALTER TABLE OWNER.TEMP_TBL MODIFY(QUEUE_DATE DATE);'
    execute immediate sql_stmt ;
    sql_stmt='commit;'
    execute immediate sql_stmt ;
    end loop
    Is there a more efficient way to execute the commands other than using execute immediate sql_stmt after every command? I have about 300 partitions to exchange and the size of my tables is approx 3Tb's so I want to get this done as quick and as efficeintly as possible

    Create a dummy partitioned table without constraints and, in a loop that will run for 5 minutes, continuously insert into the table.
    While that is running, in a separate session, exchange partitions.
    What happens?
    And yes I am returning to my instructor role intentionally.
    Please report back to the other students the results from your homework assignment. <g>

  • Partition exchange failure

    (Oracle 10g R1 on zLinux) I've got a large partitioned table with some partitions that are almost empty (but still claiming large amounts of blocks). To do some partition exchanging I created a second table that has exactly the same column layout (I used the create script from the large table without the partition directives and I tried a 'create table .. as select * from big-table) without any indexes. Fot the indexes(the plan was to re-create them when the exchanges were done.
    Now when I start the partition exchange using:
    ALTER TABLE ahd_request
    EXCHANGE PARTITION tm2002
    WITH TABLE ahd_request_small
    I get the message 'ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION'
    Any ideas wether or not this is a bug or am I missing something obivous?
    tia
    Martin

    Please check two tables are absolutely in sync with
    each other. In terms of columns and data type.That was the easy part (the query is supplied in the meta link documents).
    After that it gets more complicated because you have to check for (deleted) Function Based Indexes, Unused Columns etc. which do not show up but create/hide hidden columns etc.
    Believe me, I'm way beyond simple structure checking and will follow the only advise I haven't tried yet (from Oracle that is): dump and reload.
    regards,
    Martin

Maybe you are looking for

  • Getting pdf attachments of Purchase order as OTF

    Hi gurus, i need to get the attachment list of a purchase order and then get the OTF data of each PDF files to convert then an get the pdf Binary data. The problem is that i´m using an enterprise service, so i need to avoid any pop-up. I tried to use

  • How to bind the database?

    How to bind the database and to place the data of a field in a EditBox and to modify the data of a table.

  • Performance of new version of Numbers versus Old version

    I only use Numbers to keep track of some small sales figures and work out pricing for products I sell and stuff. Not much. The old version of Numbers, the one before this new version for dummies, that launched on my Late 2012 iMac in one single secon

  • IPhone Restore question/help.

    I'm in a bit of a situation here and want to verify that I did everything right. My mom's iPhone 3G was completely locked up today: could not be powered down, could not do the reset where you hold the Home key and the Power button at the same time fo

  • Deskjet 3510 will not scan wirelessly on OS 10.9

    I have a Deskjet 3510 that worked great wirelessly on my old Mac with Snow Leopard. I recently purchased a new IMac with Mavericks OS 10.9.5. The printer will print wirelessly but not scan wirelessly. It will only scan with the USB cable attached. I