Convert non-partition table to partition table

Hello Everybody
I am just want to ask about how to Convert non-partition table to partition table ?
Thanks
Ramez S. Sawires

Dear ARF
First of all thank you for replying me , second do u have any links talking about dbms_redefinition package
I am using Database Oracle 10g
Thanks
Ramez S. Sawires
Message was edited by:
Ramez S. Sawires

Similar Messages

  • Query with non partition key in partitioning table

    i compare query select with non-partition key condition in table partition with 3, 4 and 6 partition.
    time execution for 3 partition faster then 4 partition, time execution for 4 partition faster than 6 partition.
    i know processing query select is selection all partition, but i don't know what make time execution different between 3, 4 and 6 partition??
    whether the transfer from one partition to another partition takes time?
    this example sql trace query select for 3,4 and 6 partition
    3 partition
    SELECT *
    FROM
    EQU_PARAM_MONITORINGHASH WHERE TO_CHAR(time_stamp,'mm/yy')=('02/09')
    call          cpu    elapsed       disk        rows
    Parse        0.00       0.00          0           0
    Execute      0.00       0.00          0           0
    Fetch        5.70       7.57      25291     1157583
    total        5.70       7.57      25291     1157583
    Parsing user id: 61  (SKENARIO1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          0   PARTITION HASH (ALL) PARTITION: START=1 STOP=3
          0    TABLE ACCESS   MODE: ANALYZED (FULL) OF
                   'EQU_PARAM_MONITORINGHASH' (TABLE) PARTITION: START=1 STOP=34 partition
    SELECT *
    FROM
    EQU_PARAM_MONITORINGHASH WHERE TO_CHAR(time_stamp,'mm/yy')=('02/09')
    call          cpu    elapsed       disk        rows
    Parse        0.00       0.00          0           0
    Execute      0.00       0.00          0           0
    Fetch        5.46       8.03      25126     1157583
    total        5.46       8.03      25126     1157583
    Parsing user id: 62  (SKENARIO2)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          0   PARTITION HASH (ALL) PARTITION: START=1 STOP=4
          0    TABLE ACCESS   MODE: ANALYZED (FULL) OF
                   'EQU_PARAM_MONITORINGHASH' (TABLE) PARTITION: START=1 STOP=46 partition
    SELECT *
    FROM
    EQU_PARAM_MONITORINGHASH WHERE TO_CHAR(time_stamp,'mm/yy')=('02/09')
    call          cpu    elapsed       disk        rows
    Parse        0.00       0.00          0           0
    Execute      0.00       0.00          0           0
    Fetch        5.73       9.13      25190     1157583
    total        5.73       9.13      25190     1157583
    Parsing user id: 63  (SKENARIO3)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          0   PARTITION HASH (ALL) PARTITION: START=1 STOP=6
          0    TABLE ACCESS   MODE: ANALYZED (FULL) OF
                   'EQU_PARAM_MONITORINGHASH' (TABLE) PARTITION: START=1 STOP=6thanks
    best regards
    eko

    ekopur wrote:
    i compare query select with non-partition key condition in table partition with 3, 4 and 6 partition.
    time execution for 3 partition faster then 4 partition, time execution for 4 partition faster than 6 partition.
    i know processing query select is selection all partition, but i don't know what make time execution different between 3, 4 and 6 partition??
    whether the transfer from one partition to another partition takes time?
    this example sql trace query select for 3,4 and 6 partition
    3 partition
    SELECT *
    FROM
    EQU_PARAM_MONITORINGHASH WHERE TO_CHAR(time_stamp,'mm/yy')=('02/09')
    call          cpu    elapsed       disk        rows
    Parse        0.00       0.00          0           0
    Execute      0.00       0.00          0           0
    Fetch        5.70       7.57      25291     1157583
    total        5.70       7.57      25291     1157583
    Parsing user id: 61  (SKENARIO1)
    Rows     Execution Plan
    0  SELECT STATEMENT   MODE: ALL_ROWS
    0   PARTITION HASH (ALL) PARTITION: START=1 STOP=3
    0    TABLE ACCESS   MODE: ANALYZED (FULL) OF
    'EQU_PARAM_MONITORINGHASH' (TABLE) PARTITION: START=1 STOP=34 partition
    SELECT *
    FROM
    EQU_PARAM_MONITORINGHASH WHERE TO_CHAR(time_stamp,'mm/yy')=('02/09')
    call          cpu    elapsed       disk        rows
    Parse        0.00       0.00          0           0
    Execute      0.00       0.00          0           0
    Fetch        5.46       8.03      25126     1157583
    total        5.46       8.03      25126     1157583
    Parsing user id: 62  (SKENARIO2)
    Rows     Execution Plan
    0  SELECT STATEMENT   MODE: ALL_ROWS
    0   PARTITION HASH (ALL) PARTITION: START=1 STOP=4
    0    TABLE ACCESS   MODE: ANALYZED (FULL) OF
    'EQU_PARAM_MONITORINGHASH' (TABLE) PARTITION: START=1 STOP=46 partition
    SELECT *
    FROM
    EQU_PARAM_MONITORINGHASH WHERE TO_CHAR(time_stamp,'mm/yy')=('02/09')
    call          cpu    elapsed       disk        rows
    Parse        0.00       0.00          0           0
    Execute      0.00       0.00          0           0
    Fetch        5.73       9.13      25190     1157583
    total        5.73       9.13      25190     1157583
    Parsing user id: 63  (SKENARIO3)
    Rows     Execution Plan
    0  SELECT STATEMENT   MODE: ALL_ROWS
    0   PARTITION HASH (ALL) PARTITION: START=1 STOP=6
    0    TABLE ACCESS   MODE: ANALYZED (FULL) OF
    'EQU_PARAM_MONITORINGHASH' (TABLE) PARTITION: START=1 STOP=6
    I'm assuming you recreated the table a couple of times with different numbers of hash partitions. (Tip: always use a power of two for the number of hash partitions - it keeps them all around the same size if you are using the feature on an appropriate data set.)
    There isn't really enough difference in time within the database to make any sensible comment about the difference in times. I note that you have also edited out the fetch count for the 1.1 million rows fetched, and have not captured (or perhaps just not printed) the wait times, so we don't know where you spent the time inside and outside the database.
    For all we can tell, the difference you are worried about might simply be network time on the fetch calls, and have nothing to do with the extract you've published.
    Regards
    Jonathan Lewis

  • Best way to change partition key on existing table

    Hi,
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    Thanks

    >
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    >
    First your subject asks a different question that the text you posted: Best way to change partition key on existing table. The answer to that question is YOU CAN'T. All data has to be moved to change the partition key since each partition/subpartition is in its own segment. You either create a new table or use DBMS_REDEFINITION to redefine the table online.
    Why do you want to export all data to a file first? That just adds to the time and cost of doing the op.
    What problem are you trying to use partitioning to solve? Performance? Data maintenance? For performance the appropriate partitioning key and whether to use subpartitions depends on the types of queries and the query predicates you typically use as well as the columns that may be suitable for partition keys.
    For maintenance a common method is to partition on a date by year/month/day so you can more easily load new daily/weekly/monthly data into its own partition or drop old data that no longer needs to be kept online.
    You should use a small subset of the data when testing your partitionings strategies.
    Can you do the partitioning offline in an outage window? If not then using the DBMS_REDEFINITION is your only option.
    Without knowing what you are trying to accomplish only general advice can be given. You even mentioned that you might want to use a different set of columns than the curren table has.
    A standard heap table uses ONE segment for its data (ignoring possible LOB segments). A partitioned/subpartitioned table uses ONE segment for each partition/subpartition. This means that ALL data must be moved to partition the table (unless you are only creating one partition).
    This means that every partitioning scheme that uses a different partition key requires ALL data to be moved again for that test.
    Provide some information about what problem you are trying to solve.
    >
    Is this quicker than datapump?
    >
    Yes - exporting the data simplying moves it all an additional time. Ok to export if you need a backup before you start.
    >
    Found artcle which talks about using merge option on datapump import to convert partitioned table to non-partitioned table.
    >
    How would that apply to you? That isn't what you said you wanted to do.

  • Make partitioning an existing regular table

    Hi,
    I am using oracle 9i R2 on linux Red hat 4.4.My question is, I have a table in database with the name of employee
    and want to make partition this table (Range Partition).Which steps should i follow to convert this regular table in range partition table.
    SQL> desc employee
    Name Null? Type
    DATE DATE
    EMPLOYEE_ID NOT NULL NUMBER(6)
    LASTNAME NOT NULL VARCHAR2(25)
    SALARY NOT NULL NUMBER(8,2)
    Thanks.

    Sh.Ahmad wrote:
    Hi,
    I am using oracle 9i R2 on linux Red hat 4.4.My question is, I have a table in database with the name of employee
    and want to make partition this table (Range Partition).Which steps should i follow to convert this regular table in range partition table.
    SQL> desc employee
    Name Null? Type
    DATE DATE
    EMPLOYEE_ID NOT NULL NUMBER(6)
    LASTNAME NOT NULL VARCHAR2(25)
    SALARY NOT NULL NUMBER(8,2)
    Thanks.refer the link:-
    http://arjudba.blogspot.com/2008/11/how-to-convert-non-partitioned-table-to.html
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c12parti.htm

  • Partitioning an already existing table

    Hi,
    I need to partition many existing tables. All these tables hold more than 50 million data each.
    Since i am new to partitioning, can any one kindly guide what are the best practices one should look for under such circumstances.
    Is it neccessary to dwell on the following point
    1) Type of table (Heap or IOT etc).
    2) Indexes and kinds of indexes along with the columns in which they are defined.
    3) Block size
    4) Constraints
    5) Row Chaining, Migration etc.
    I have very basic idea about the above mentioned points.
    Please guide me as to how should the partitioning be done, what sort of partitioning is best, any performace issues.
    I sincerely appreciate the cooperation of all members.
    Thanks in advance
    Message was edited by:
    Master

    Hi,
    to create a partitioned table from the non portioned table
    create table part partition XXXXXXXX
    (partition p01 tablespace XX1,
    partition p02 tablespace XX2,
    partition p03 tablespace XX3,
    partition p04 tablespace XX 4
    nologging
    as select * from old data ;
    OR
    export the old non partition table data – rename the non partitioned table, create partitioned table import the data
    OR
    Exchanging Partitions
    You can convert a partition (or sub partition) into a non-partitioned table, and a non-partitioned table into a partition (or sub partition) of a partitioned table by exchanging their data segments. You can also convert a hash-partitioned table into a partition of a range-hash partitioned table, or convert the partition of the range-hash partitioned table into a hash-partitioned table. Similarly, you can convert a list-partitioned table into a partition of a range-list partitioned table, or convert the partition of the range-list partitioned table into a list-partitioned table
    One of the great features about partitioning, and most specifically range-based partitioning, is the ability to load in new data quickly and easily with minimal impact on the current users. The manuals indicate that the critical command to achieve this is as follows:
    alter table pt_tab1 exchange partition p_9999
    with table new_data
    Ani

  • How to change the partition type on a table with data

    Hi
    I have a table, which is partitioned by list on date column. The table contains large volume of data.
    My requirement is to make the list partition into range on the same date column.
    I am working on Oracle10g
    Kindly advice

    partitioned by list on date How many distinct DATE values do you have ? Each DATE value would be a Partition in List Partitioning.
    Why do you need to convert this to RANGE Partitioning ? How many DATE values do you expect in the table in the future ?
    You can use DBMS_REDIFINITION to copy a LIST Partitioned Table to a RANGE Partitioned Table and then switch the tables at the end.
    See examples (where the source table is not partitioned)
    http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php
    http://uhesse.com/2010/02/15/partitioning-a-table-online-with-dbms_redefinition/
    But before converting I would justify why a LIST Partitioned Table be converted to RANGE Partitioned. Do you have Date-Range queries ?
    Hemant K Chitale
    Edited by: Hemant K Chitale on Mar 15, 2013 2:11 PM

  • Use of Logical Partition in a Oracle Table...

    What is the use of Logical Partition in a Oracle Table as Target.  Techincal Manual does not say any significance.
    My question is:
    If the Table has no partitions and if we add Logical Partitions using Data Service, what purpose will it serve?
    We are planning to load 30 Million records a day into a Oracle Table. As of now the Target table has no partition and we are planning to have that soon. Is there a better way to load the data into Target Table, using Partition, Bulk Loading(API), Degree of Parallelism, etc., We have not dealt data of that volume, inputs are highly appreciated.
    Regards.
    Santosh.

    Initial Value:
    Indicator that NOT NULL is forced for this field
    Use
    Select this flag if a field to be inserted in the database is to be filled with initial values. The initial value used depends on the data type of the field.
    Please note that fields in the database for which the this flag is not set can also be filled with initial values.
    When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. Only when new fields are added or inserted, are these filled with initial values. An exception is key fields. These are always filled automatically with initial values.
    Restrictions and notes:
    The initial value cannot be set for fields of data types LCHR, LRAW, and RAW. If the field length is greater than 32, the initial flag cannot be set for fields of data type NUMC.
    If a new field is inserted in the table and the initial flag is set, the complete table is scanned on activation and an UPDATE is made to the new field. This can be very time-consuming.
    If the initial flag is set for an included structure, this means that the attributes from the structure are transferred. That is, exactly those fields which are marked as initial in the definition have this attribute in the table as well.
    hope it helps,
    Saipriya

  • Problem in truncate/drop partitions in a table having nested table columns.

    Hi,
    I have a table that has 2 columns of type nested table. Now in the purge process, when I try to truncate or drop a partition from this table, I get error that I can't do this (because table has nested tables). Can anybody help me telling how I will be able to truncate/drop partition from this table? IF I change column types from nested table to varray type, will it help?
    Also, is there any short method of moving existing data from a nested table column to a varray column (having same fields as nested table)?
    Thanks in advance.

    >
    I have a table that has 2 columns of type nested table. Now in the purge process, when I try to truncate or drop a partition from this table, I get error that I can't do this (because table has nested tables). Can anybody help me telling how I will be able to truncate/drop partition from this table?
    >
    Unfortunately you can't do those operations when a table has a nested table column. No truncate, no drop, no exchange partition at the partition level.
    A nested table column is stored as a separate table and acts like a 'child' table with foreign keys to the 'parent' table. It is these 'foreign keys' that prevent the truncation (just like normal foreign keys prevent truncating partions and must be disabled first) but there is no mechanism to 'disable' them.
    Just one excellent example (there are many others) of why you should NOT use object columns at all.
    >
    IF I change column types from nested table to varray type, will it help?
    >
    Yes but I STRONGLY suggest you take this opportunity to change your data model to a standard relational one and put the 'child' (nested table) data into its own table with a foreign key to the parent. You can create a view on the two tables that can make data appear as if you have a nested table type if you want.
    Assuming that you are going to ignore the above advice just create a new VARRAY type and a table with that type as a column. Remember VARRAYs are defined with a maximum size. So the number of nested table records needs to be within the capacity of the VARRAY type for the data to fit.
    >
    Also, is there any short method of moving existing data from a nested table column to a varray column (having same fields as nested table)?
    >
    Sure - just CAST the nested table to the VARRAY type. Here is code for a VARRAY type and a new table that shows how to do it.
    -- new array type
    CREATE OR REPLACE TYPE ARRAY_T AS VARRAY(10) OF VARCHAR2(64)
    -- new table using new array type - NOTE there is no nested table storage clause - arrays stored inline
    CREATE TABLE partitioned_table_array
         ( ID_ INT,
          arra_col  ARRAY_T )
         PARTITION BY RANGE (ID_)
         ( PARTITION p1 VALUES LESS THAN (40)
         , PARTITION p2 VALUES LESS THAN(80)
         , PARTITION p3 VALUES LESS THAN(100)
    -- insert the data from the original table converting the nested table data to the varray type
    INSERT INTO PARTITIONED_TABLE_ARRAY
    SELECT ID_, CAST(NESTED_COL AS ARRAY_T) FROM PARTITIONED_TABLENaturally since there is no more nested table storage you can truncate or drop partitions in the above table
    alter table partitioned_table_array truncate partition p1
    alter table partitioned_table_array drop partition p1

  • Partition exchange error on table with nested table

    On Oracle 11.2.0.1, I have a partitioned table with some partitions that need to be 'archived' (in terms of moving partitions to an 'archive' table).
    I have a source table like:
    CREATE TABLE IS_PODACI245
      ID_OBJEKTA_IDENTIFIKACIJA  NUMBER(10),
      ID_OBJEKTA                 NUMBER(20),
      DATUM                      TIMESTAMP(6)       NOT NULL,
      TZ                         NUMBER(3),
      DATA1                      NUMBER(10),
      DATA2                      NUMBER(6),
      DATA3                      NUMBER(10),
      DATA4                      NUMBER,
      DATA5                      T_NTCIP_CLIMATE_TABLE
    NESTED TABLE DATA5 STORE AS IS_PODACI245_STORE_TABLE
    TABLESPACE DATA
    PARTITION BY RANGE (DATUM)
      PARTITION P_201107 VALUES LESS THAN (TIMESTAMP' 2011-08-01 00:00:00')
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA, 
      PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE INDEX IDX_IS_PODACI245_KOMPLEKS ON IS_PODACI245
    (ID_OBJEKTA_IDENTIFIKACIJA, ID_OBJEKTA, DATUM)
      TABLESPACE DATA
    LOCAL ( 
      PARTITION P_201107
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA, 
      PARTITION P_MAXVALUE
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA
    NOPARALLEL;
    CREATE OR REPLACE TYPE t_ntcip_climate_table as table of t_ntcip_climate_fmt;
    CREATE OR REPLACE TYPE t_ntcip_climate_FMT as object
    (  dev_index number(6)
    ,   dev_description varchar2(512)
    ,   dev_type number(10)
    ,   dev_status number(10)
    ,   dev_mfr_status varchar2(512)
    ,   dev_active number(3)
    ,   dev_test_activation number(10)
    /I would like to make exchange partition using stage table, and everything is going fine on all tables, but only on a few of them (listed source is one of them, and they're only tables with nested tables wihin), where I get an error.. but sometimes ;)
    on a statement like:
    ALTER TABLE IS_PODACI245_ARH EXCHANGE PARTITION P_201106  WITH TABLE IS_PODACI245_STAGE EXCLUDING INDEXES  WITHOUT VALIDATION;I got an error:
    ORA-00001: unique constraint (TXV.SYS_C0032911) violated
    it's an unique index between parent and nested table.
    what could cause that problem?

    Dear,
    I suppose that the unique constraint
    ORA-00001: unique constraint (TXV.SYS_C0032911) violatedis the one you 've created on the nested table IS_PODACI245_STORE_TABLE
    If so, why not disable that constraint and try again.
    I have never exchanged such a kind of partitioned table having a nested table in it. But, I could imagine that the cloned non partitioned table IS_PODACI245_STAGE should at least be the exact image of the partitioned table IS_PODACI245_ARH (of course without the partition part) but with the nested table part and including all indexes
    In addition, if you have a parent/child relationship between your partitioned tables, then there is a chronological order of exchange starting by the child and then finishing by the parent
    see the following link for more information about this order of exchange (and comment 2 for an example also)
    http://jonathanlewis.wordpress.com/2006/12/10/drop-parent-partition/#more-65
    Hope this helps
    Mohamed Houri

  • How to create partition after creating the table

    I have created a table. Now I want to create range partitions of that table.Please tell me how to do this?

    Yes, that is true.
    It is also possible to create a new partitioned table with exactly the same structure, ensure it has a partition, and exchange (trade) the partition for that existing table. That is outlined in the DBA manual at http://tahiti.oracle.com under chapter 17 "Managing Partitioned Tables and Indexes" close to the keywords 'exchange' or 'convert'

  • Is it possible to create table with partition in compress mode

    Hi All,
    I want to create a table in compress option, with partitions. When i create with partitions the compression isnt enabled, but with noramal table creation the compression option is enables.
    My question is:
    cant we create a table with partition/subpartition in compress mode..? Please help.
    Below is the code that i have used for table creation.
    CREATE TABLE temp
      TRADE_ID                    NUMBER,
      SRC_SYSTEM_ID               VARCHAR2(60 BYTE),
      SRC_TRADE_ID                VARCHAR2(60 BYTE),
      SRC_TRADE_VERSION           VARCHAR2(60 BYTE),
      ORIG_SRC_SYSTEM_ID          VARCHAR2(30 BYTE),
      TRADE_STATUS                VARCHAR2(60 BYTE),
      TRADE_TYPE                  VARCHAR2(60 BYTE),
      SECURITY_TYPE               VARCHAR2(60 BYTE),
      VOLUME                      NUMBER,
      ENTRY_DATE                  DATE,
        REASON                      VARCHAR2(255 BYTE),
    TABLESPACE data
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    NOLOGGING
    COMPRESS
    NOCACHE
    PARALLEL (DEGREE 6 INSTANCES 1)
    MONITORING
    PARTITION BY RANGE (TRADE_DATE)
    SUBPARTITION BY LIST (SRC_SYSTEM_ID)
    SUBPARTITION TEMPLATE
      (SUBPARTITION SALES VALUES ('sales'),
       SUBPARTITION MAG VALUES ('MAG'),
       SUBPARTITION SPI VALUES ('SPI', 'SPIM', 'SPIIA'),
       SUBPARTITION FIS VALUES ('FIS'),
       SUBPARTITION GD VALUES ('GS'),
       SUBPARTITION ST VALUES ('ST'),
       SUBPARTITION KOR VALUES ('KOR'),
       SUBPARTITION BLR VALUES ('BLR'),
       SUBPARTITION SUT VALUES ('SUT'),
       SUBPARTITION RM VALUES ('RM'),
       SUBPARTITION DEFAULT VALUES (default)
    PARTITION RMS_TRADE_DLY_MAX VALUES LESS THAN (MAXVALUE)    
        LOGGING
            TABLESPACE data
         ( SUBPARTITION TS_MAX_SALES VALUES ('SALES')      TABLESPACE data,
        SUBPARTITION TS_MAX_MAG VALUES ('MAG')      TABLESPACE data,
        SUBPARTITION TS_MAX_SPI VALUES ('SPI', 'SPIM', 'SPIIA')      TABLESPACE data,
        SUBPARTITION TS_MAX_FIS VALUES ('FIS')      TABLESPACE data,
        SUBPARTITION TS_MAX_GS VALUES ('GS')      TABLESPACE data,
        SUBPARTITION TS_MAX_ST VALUES ('ST')      TABLESPACE data,
        SUBPARTITION TS_MAX_KOR VALUES ('KOR')      TABLESPACE data,
        SUBPARTITION TS_MAX_BLR VALUES ('BLR')      TABLESPACE data,
        SUBPARTITION TS_MAX_SUT VALUES ('SUT')      TABLESPACE data,
        SUBPARTITION TS_MAX_RM VALUES ('RM')      TABLESPACE data,
        SUBPARTITION TS_MAX_DEFAULT VALUES (default)      TABLESPACE data)); Edited by: user11942774 on 8 Dec, 2011 5:17 AM

    user11942774 wrote:
    I want to create a table in compress option, with partitions. When i create with partitions the compression isnt enabled, but with noramal table creation the compression option is enables. First of all your CREATE TABLE statement is full of syntax errors. Next time test it before posting - we don't want to spend time on fixing things not related to your question.
    Now, I bet you check COMPRESSION value of partitioned table same way you do it for a non-partitioned table - in USER_TABLES - and therefore get wrong results. Since compreesion can be enabled on individual partition level you need to check COMPRESSION in USER_TAB_PARTITIONS:
    SQL> CREATE TABLE temp
      2  (
      3    TRADE_ID                    NUMBER,
      4    SRC_SYSTEM_ID               VARCHAR2(60 BYTE),
      5    SRC_TRADE_ID                VARCHAR2(60 BYTE),
      6    SRC_TRADE_VERSION           VARCHAR2(60 BYTE),
      7    ORIG_SRC_SYSTEM_ID          VARCHAR2(30 BYTE),
      8    TRADE_STATUS                VARCHAR2(60 BYTE),
      9    TRADE_TYPE                  VARCHAR2(60 BYTE),
    10    SECURITY_TYPE               VARCHAR2(60 BYTE),
    11    VOLUME                      NUMBER,
    12    ENTRY_DATE                  DATE,
    13      REASON                      VARCHAR2(255 BYTE),
    14    TRADE_DATE                  DATE
    15  )
    16  TABLESPACE users
    17  PCTUSED    0
    18  PCTFREE    10
    19  INITRANS   1
    20  MAXTRANS   255
    21  NOLOGGING
    22  COMPRESS
    23  NOCACHE
    24  PARALLEL (DEGREE 6 INSTANCES 1)
    25  MONITORING
    26  PARTITION BY RANGE (TRADE_DATE)
    27  SUBPARTITION BY LIST (SRC_SYSTEM_ID)
    28  SUBPARTITION TEMPLATE
    29    (SUBPARTITION SALES VALUES ('sales'),
    30     SUBPARTITION MAG VALUES ('MAG'),
    31     SUBPARTITION SPI VALUES ('SPI', 'SPIM', 'SPIIA'),
    32     SUBPARTITION FIS VALUES ('FIS'),
    33     SUBPARTITION GD VALUES ('GS'),
    34     SUBPARTITION ST VALUES ('ST'),
    35     SUBPARTITION KOR VALUES ('KOR'),
    36     SUBPARTITION BLR VALUES ('BLR'),
    37     SUBPARTITION SUT VALUES ('SUT'),
    38     SUBPARTITION RM VALUES ('RM'),
    39     SUBPARTITION DEFAULT_SUB VALUES (default)
    40    )  
    41  (  
    42   PARTITION RMS_TRADE_DLY_MAX VALUES LESS THAN (MAXVALUE)    
    43      LOGGING
    44          TABLESPACE users
    45       ( SUBPARTITION TS_MAX_SALES VALUES ('SALES')      TABLESPACE users,
    46      SUBPARTITION TS_MAX_MAG VALUES ('MAG')      TABLESPACE users,
    47      SUBPARTITION TS_MAX_SPI VALUES ('SPI', 'SPIM', 'SPIIA')      TABLESPACE users,
    48      SUBPARTITION TS_MAX_FIS VALUES ('FIS')      TABLESPACE users,
    49      SUBPARTITION TS_MAX_GS VALUES ('GS')      TABLESPACE users,
    50      SUBPARTITION TS_MAX_ST VALUES ('ST')      TABLESPACE users,
    51      SUBPARTITION TS_MAX_KOR VALUES ('KOR')      TABLESPACE users,
    52      SUBPARTITION TS_MAX_BLR VALUES ('BLR')      TABLESPACE users,
    53      SUBPARTITION TS_MAX_SUT VALUES ('SUT')      TABLESPACE users,
    54      SUBPARTITION TS_MAX_RM VALUES ('RM')      TABLESPACE users,
    55      SUBPARTITION TS_MAX_DEFAULT VALUES (default)      TABLESPACE users));
    Table created.
    SQL>
    SQL>
    SQL> SELECT  PARTITION_NAME,
      2          COMPRESSION
      3    FROM USER_TAB_PARTITIONS
      4    WHERE TABLE_NAME = 'TEMP'
      5  /
    PARTITION_NAME                 COMPRESS
    RMS_TRADE_DLY_MAX              ENABLED
    SQL> SELECT  COMPRESSION
      2    FROM USER_TABLES
      3    WHERE TABLE_NAME = 'TEMP'
      4  /
    COMPRESS
    SQL> SY.

  • Table controlled partitioning - please share your experiences.

    hello ,
    is anyone using table controlled partitioning in the sap on db2 for z/os enviroment?
    can you please share your [good/bad]experiences on the subject ?
    is there anything we should all watchout for ?
    thanks
    omer brandis
    visit the sap on db2 for z/os blog
    http://blogs.ittoolbox.com/sap/db2/

    hello ,
    is anyone using table controlled partitioning in the sap on db2 for z/os enviroment?
    can you please share your [good/bad]experiences on the subject ?
    is there anything we should all watchout for ?
    thanks
    omer brandis
    visit the sap on db2 for z/os blog
    http://blogs.ittoolbox.com/sap/db2/

  • How to create ddl for partitioning for a child table?

    Hi folks,
    I am new to the partitioning topic. I red some manuals and tutorials but I did not found exactly what I need. So I would ask for your help.
    I have two tables.
    The partitioning of the master table is clear:
    create TABLE ASP_PARTITION_TABLE_MASTER
    MASTER_ID VARCHAR2(20) NOT NULL
    , TIMESTAMP DATE
    , DATA VARCHAR2(20)
    , CONSTRAINT ASP_PARTITION_TABLE_MASTE_PK PRIMARY KEY
    MASTER_ID
    USING INDEX
    ENABLE
    PARTITION BY RANGE (TIMESTAMP)
    PARTITION PARTITION1 VALUES LESS THAN (TO_DATE('20090101','YYYYMMDD')) NOCOMPRESS
    , PARTITION PARTITION2 VALUES LESS THAN (TO_DATE('20100101','YYYYMMDD')) NOCOMPRESS
    , PARTITION PARTITION3 VALUES LESS THAN (TO_DATE('20110101','YYYYMMDD')) NOCOMPRESS
    This table should be partitioned by a timestamp.
    Now comes the difficulty:
    I have a child table which has the master_id as foreign key. The slave table should also be partitioned by the timestamp - but this one occurs only in the master table.
    CREATE TABLE ASP_PARTITION_TABLE_SLAVE
    SLAVE_ID VARCHAR2(20) NOT NULL
    , FK_MASTER_ID NUMBER(10)
    , DATA1 VARCHAR2(20)
    , DATA2 VARCHAR2(20)
    , COLUMN1 VARCHAR2(20)
    , CONSTRAINT ASP_PK_SLAVE PRIMARY KEY
    SLAVE_ID
    ENABLE
    ALTER TABLE ASP_PARTITION_TABLE_SLAVE
    ADD CONSTRAINT ASP_FK_MASTER_IS FOREIGN KEY
    SLAVE_ID
    REFERENCES ASP_PARTITION_TABLE_MASTER
    MASTER_ID
    ON DELETE CASCADE ENABLE;
    How can I create such a range partition for the slave table?
    PS: Currently we are using oracle 10.2 but we will upgrade to oracle 11g in near future.
    Thanks in advance,
    Andreas

    @sb92075:
    seems if I should give more details:
    the parent table is holding the master_id, the timestamp and plenty of general information which is valid for all children.
    Each parent has between 5 and 50 children which contain different data items. So our child table is much bigger than the parent table.
    Our selects are joining parent and child table filtered by the timestamp and some other indexed rows, so we are not saving the same timestamp redundantly.
    @bluefrog
    With the partitioning we would like to reach the following goals:
    1. gain more performance (quicker response time)
    2. get the ability to archive and drop partitions which are older than a specific timestamp. (We only need to keep the data of the last 1.5 years so we would like to drop the complete partition / tablespace instead of using a delete-statement which generates much load (transaction, archive, logging)).
    Thank you for your links. I will have a look on it.
    But due to the archiving issue we would also like split up the child table by the timestamp of the parent table.
    Regards, Andreas

  • ORA-00604 ORA-00904 When query partitioned table with partitioned indexes

    Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
    Query runs fine when query the partitioned table without partitioned indexes.
    Here is the query.
    SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
    al27.accessory_code
    FROM vlc.veh_vdc_accessorization_fact al1,
    vlc.vdc_dim al2,
    vlc.model_attribute_dim al7,
    vlc.ppo_list_dim al18,
    vlc.ppo_list_indiv_type_dim al23,
    vlc.accy_type_dim al27
    WHERE ( al2.vdc_id = al1.vdc_location_id
    AND al7.model_attribute_id = al1.model_attribute_id
    AND al18.mydppolist_id = al1.ppo_list_id
    AND al23.mydppolist_id = al18.mydppolist_id
    AND al23.mydaccytyp_id = al27.mydaccytyp_id
    AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
    AND al2.vdc_name IN
    ('PORT OF BALTIMORE',
    'PORT OF JACKSONVILLE - LEXUS',
    'PORT OF LONG BEACH',
    'PORT OF NEWARK',
    'PORT OF PORTLAND'
    AND al27.accessory_code IN ('42', '43', '44', '45')
    GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_code

    I would recommend that you post this at the following OTN forum:
    Database - General
    General Database Discussions
    and perhaps at:
    Oracle Warehouse Builder
    Warehouse Builder
    The Oracle OLAP forum typically does not cover general data warehousing topics.

  • Can we create partitions in an existing table?

    Hi,
    Can we create partitions in an existing table which has about a million rows? I am using oracle 9i database.
    Can any one suggest me on this please.

    07b3ea8e-c4c5-4559-9055-ed38853dc64e wrote:
    Hi,
    Can we create partitions in an existing table which has about a million rows? I am using oracle 9i database.
    Can any one suggest me on this please.
    can NOT be done.
    research DBMS_REDEFINITION

Maybe you are looking for

  • Creation of PO Error

    When creation of PO, the following error populated, Pl suggest. PO header data still faulty - E Company code not assigned to country or country to calculation procedure. - E warm regards Srinivas.

  • Object in import-file header does not correspond to the migration object

    Hi Forum, I have loaded Business partner successfully with the file created in Workbench with test data. Now I want to load the data from Application server. But i am getting the error "Object in import-file header does not correspond to the migratio

  • Wireless connects via MAC address, but not with essid.

    I have an eee 901 using the zeneee901 kernel. I got wireless to work out of the box to an extent. This will probably be easier to exlain just posting the commands. ifconfig ra0 up iwlist ra0 scan iwconfig ra0 essid *essid here* dhcpcd ra0 TIMEOUT GOE

  • Computer crashed while downloading an album

    My computer crashed while downloading the new Kings of Leon album and now there are several songs that are not on my computer. I don't want to pay for the songs individuall as they should have been downloaded.

  • Problems trying to install the latest flash player on Windows XP

    I have been trying for a while now to install flash player the latest version but keep getting the same error message 19166, does anyone have a solution to this please as it has now become so frustrating!!! I would appreciate any help please Thanks