Split partitions in number of partitions

I have a partitioned table. Score is based on the Date column, and each partition is for the period of 1 month. I want to split a partition into 4 smaller partitions.

I tried split partition but split partition can be used to split the existing partition into 2 partitions. I tried to add sub partitions in an existing table, which failed, because this isn't a composite partition.

That's what I tried.

alter table activity
set subpartition template
(
subpartition SP_1_NEWNAME values less than (TO_DATE('07-JAN-2007 00:00:00', 'DD-MON-YYYY HH24:MI:SS')),
subpartition sp_2_NEWNAME values less than (to_date('15-JAN-2007 00:00:00', 'DD-MON-YYYY HH24:MI:SS')),
subpartition SP_3_NEWNAME values less than (to_date('15-JAN-2007 00:00:00', 'DD-MON-YYYY HH24:MI:SS'))
);

Any suggestions?

Thank you

you would have to hit the score several times. You can recreate the object with the Assembly of partitions or dbms_redefinition allows you to change the definition of the object.

Tags: Database

Similar Questions

  • Question about "split partition" command

    Hello

    I have the following partitioned table...

    CREATE TABLE trans_tab
    (

    TRANS_ID number (10),
    DATE OF TRANS_DATE,
    CONSTRAINT PK_TRNS_ID PRIMARY KEY (TRANS_ID))
    PARTITION BY RANGE (TRANS_DATE)
    (PARTITION TRANS_2010 VALUES LESS THAN (TO_DATE ("2010-10-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN '")) TABLESPACE TRANS_2010,)
    PMAX VALUES LESS THAN (MAXVALUE) TABLESPACE TRANS_MAX PARTITION);

    Now, I intend to add a partition, as shown below...

    ALTER table split partition pmax trans_tab at (TO_DATE (' 2012-10-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN ')) in (2012 partition, partition pmax);


    The command above split partition worked well and ended quickly in the TEST environment which had only 100 records. I now intend to do in the production, which has about 90 MM records in the table. Here are my questions...

    (1) I will try to find how long would the "split partition" command to run into a table that has ~ 90 mm record table the command "split partition" to physically move the records or just logically to remap the records to the appropriate partition? If it is logical remapping, I guess that the split command would complement quickly even against a huge table... Could check you?

    (2) in the TEST environment, I checked the non partitioned status of the global and the local index after splitting the partiton and they look good? Should I be rebuild the index after splitting the partition?

    Thanks for your time...

    Assuming he has no line of 2012 year in partition PMAX, the SPLIT would create a vacuum PMAX anew. However, it has the maximum value of TRANS_DATE in the PMAX partition - so he must sweep the partition (or use a LOCAL index on the partition, if available). Therefore, depending on how it can identify lines, it may take a little time.

    I think that the current PMAX partition is not empty (that is, it has lines of 2011). As a result, a SPLIT will cause GLOBAL Indexes to score UNUSABLE unlesss you use the UPDATE GLOBAL INDEXES.

    Was your test with the actual number of lines to PMAX?

    Hemant K Collette

  • Max Split partition

    I have a table of 20 GB which has been partitioned by range (quarterly of the years of annual basis basis).
    And most of the data have been stored in the max score and the segment size more quickly.
    Now, I want to get rid of max partition and divide the table with more music that would capture data each year. This way I can have only 2 years worth of data on production and partition can be removed easily after moving to datawarehouse.

    Please suggest. I want to divide partitions is each year as
    ""2008"PARTITION VALUES LOWER THAN (TO_DATE (' 2009-01-01 00:00:00 ',))".
    TABLESPACE "LLS_DATA01" NOCOMPRESS.


    Here is the table / / desc

    «CREATE TABLE «THEY'RE "» test. "
    ("STARTDATE" DATE NOT NULL ACTIVATE,)
    ACTIVATE THE "CALLID' CHAR (9 BYTES) NOT NULL,
    NUMBER OF "CUSTOMERLLSID."
    NUMBER OF "CRCLIENTLLSID."
    NUMBER OF "EAPLLSID."
    NUMBER OF "EAPCOMMROOMID."
    'LANGID' VARCHAR2 (5 BYTE),
    VARCHAR2 (20 BYTE) "CRCLIENTID."
    VARCHAR2 (255 BYTE) "PERSONALCODE."
    "PIN."
    VARCHAR2 (4 BYTE) "SPECIALPROMOCODE."
    NUMBER OF "PREBILLESTIMATE."
    CHECK CONSTRAINT 'LANID"ENABLE (LANID IN ('A', 'B', 'C', 'E', 'P')),
    ENABLE CHECK CONSTRAINT 'TRUE_OR_FALSE_IC1' (InterpreterLunchAdjustmentMade IN (', 'F')),
    ENABLE CHECK CONSTRAINT 'TRUE_OR_FALSE_IC2' (DontBillCustomer IN (', 'F')),
    ENABLE CHECK CONSTRAINT 'TRUE_OR_FALSE_IC3' (DontPayInterpreter IN (', 'F')),
    ENABLE CHECK CONSTRAINT 'TRUE_OR_FALSE_IC4' (RecordChanged IN (', 'F')),
    ENABLE CHECK CONSTRAINT 'TRUE_OR_FALSE_IC5' (LogicalDelete IN (', 'F')),
    KEY CONSTRAINT PRIMARY "XPKINTERPRETATIONCALLS" ("INTERPRETATIONSTARTDATE", 'CALLID')
    TABLESPACE "LLS_INDX01" ENABLE
    )
    TABLESPACE "U12_DATA".
    PARTITION BY RANGE ("STARTDATE")
    (PARTITION '2007Q 3' VALUES LESS THAN (TO_DATE (' 2007-10-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN ')))
    TABLESPACE "LLS_INTCALLS_DATA01" NOCOMPRESS,
    PARTITION '2007Q 4' VALUES LESS THAN (TO_DATE (' 2008-01-01 00:00:00 ',))
    TABLESPACE "LLS_DATA01" NOCOMPRESS,
    PARTITION 'CALLSMAX' VALUES LESS THAN (MAXVALUE)
    TABLESPACE NOCOMPRESS 'LLS_INTCALLS_DATA01');

    Go to the Morgan Library: www.morganslibrary.org/reference.html
    Select the PARTITIONING
    Search for "Split Partition".

    If you like the library... to bookmark the page.

  • After splitting partition index was not marked UNUSABLE. Oracle 11.1.0.6.0

    Dear experts,

    I do the following:

    SQL > create table tab (an integer, whole b)

    2 partition () range (a)

    3 partition p10 values less than (10),

    4 partition p20 values less than (20).

    5 partition pmax values less than (10000)

    6  );

    Table created

    SQL > alter table tab add constraint tab_pk key primary (b);

    Table changed

    SQL > insert into tab values (1, 1);

    1 row inserted

    SQL > insert into tab values (19: 2);

    1 row inserted

    SQL > insert into tab values (9999, 3);

    1 row inserted

    SQL > commit;

    Validation complete

    SQL > select index_name, status of user_indexes where index-name = "TAB_PK";

    INDEX_NAME STATUS

    ------------------------------ --------

    VALID TAB_PK

    SQL > tab table split partition of alter

    2 pmax (30) into (partition, partition pmax p30);

    Table changed

    SQL > select index_name, status of user_indexes where index-name = "TAB_PK";

    INDEX_NAME STATUS

    ------------------------------ --------

    VALID TAB_PK

    Could you explain please why the overall index of tab_pk was not marked UNUSABLE? The partmax of the partition was not empty.

    It looks like you were the beneficiary of an optimization: Maintenance of Partitions

  • Help Split Partition

    Is - a can split a partition in addition to 2?

    Example:
    alter table HISTORY
    split partition HIST_MAX 
    at (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    into (
    PARTITION HIST_10Q1
        STORAGE(FREELISTS 1 
                FREELIST GROUPS 1)
        TABLESPACE HIST_DATA_1
        LOGGING,        
    PARTITION HIST_MAX_NEW
        STORAGE(FREELISTS 1 
                FREELIST GROUPS 1)
        TABLESPACE HIST_DATA_4
        LOGGING
    );
    TO
    alter table HISTORY
    split partition HIST_MAX 
    at (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    into (
    PARTITION HIST_10Q1
        STORAGE(FREELISTS 1 
                FREELIST GROUPS 1)
        TABLESPACE HIST_DATA_1
        LOGGING,        
    PARTITION HIST_10Q2
        STORAGE(FREELISTS 1 
                FREELIST GROUPS 1)
        TABLESPACE HIST_DATA_1
        LOGGING,        
    PARTITION HIST_10Q3
        STORAGE(FREELISTS 1 
                FREELIST GROUPS 1)
        TABLESPACE HIST_DATA_1
        LOGGING,
    PARTITION HIST_10Q4
        STORAGE(FREELISTS 1 
                FREELIST GROUPS 1)
        TABLESPACE HIST_DATA_1
        LOGGING,                
    PARTITION HIST_MAX_NEW
        STORAGE(FREELISTS 1 
                FREELIST GROUPS 1)
        TABLESPACE HIST_DATA_4
        LOGGING
    );
    Our MAX partition has grown too great and fast that we must divide and add more partitions to cover what we have in the MAX and also for the future. I know we can do it one by one (divided by 2), but I was wondering if we can do all of a sudden.

    Version is 9.2.0.7

    No, you must do the split of recursively.

    Divide HIST_MAX by (HIST_10Q4, HIST_MAX)

    Then, divided HIST_10Q4 (HIST_10Q3, HIST_10Q4)

    Then, divided HIST_10Q4 (HIST_10Q2, HIST_10Q3)
    and so on.

    Hemant K Collette

  • NOLOGGING in alter table split partition...

    Hi all

    Please can tell me where I would add the NOLOGGING in the below statement, or any other means by which I can stop to redo being generated

    ALTER table split partition EB_LOGS_082008 at (to_date('01-01-2010','DD-MM-YYYY')) NOLOGGING EB_LOGS into (partition EBLAST_TABLE, partition EB_LOGS_012010 tablespace EBLAST_TABLE tablespace EB_LOGS_082008) parallel;

    Wow... Grammar ALTER TABLE just constantly more and more complex, isn't?

    According to this:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10592/clauses005.htm#CJAHABGF

    "For partitioned objects, the value specified for this clause is the physical attribute by default segments (and ALTER following... associated with all the partitions specified in the CREATE statement ADD PARTITION statements), unless you specify the logging attribute in the description of the PARTITION. »

    If I read that correctly, so if you want the NOLOGGING keyword to indicate more than just the physical default attribute, then it must be in the description of the PARTITION.

    So something like this, perhaps?
    Totally not tested, BTW:
    ALTER table EB_LOGS split partition EB_LOGS_082008 at (to_date('01-01-2010','DD-MM-YYYY')) into (partition EB_LOGS_082008 tablespace EBLAST_TABLE nologging, partition EB_LOGS_012010 tablespace EBLAST_TABLE nologging) parallel;

    Once again, this is an assumption and cannot yet pass the analysis.

    In regards to the perceived dangers of NOLOGGING operations, well, it is certainly something that must be clearly understood, but not to fear. The disadvantage of an operation NOLOGGING is that if you need to recover from a backup taken before the NOLOGGING operation, until a point in time after the operation NOLOGGING objects in the database that were submitted to NOLOGGING operations will logically corrupted and must be rebuilt.

    Finally, I fell on this can also be useful, regarding the optimization of SPLIT PARTITION operations:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10837/part_admin.htm#VLDBG00304

    Hope that helps,

    -Mark

  • Split partition partition types

    11.2.0.4

    Big enough table, 800 GB.  several columns.  4 of interest here.

    (identification number,

    date of app_date,

    keep varchar2 (1).

    old varchar2 (1))

    Table is currently divided by the id.   Due to a change in treatment, that I need to reorganize by changing the partitioning to be mainly on the field of app_date and then also under divided by a combination of fields (keep, old).

    I could create blank table with partitions and push data there, but I was wondering if split characteristic partition is possible for use here to save the time and space to work?

    I'll expand the question then, is at - it another way to reorganize the partitiong method other than to create the new table?

    Non - Oracle needs to create a new table (using DBMS_REDEFINITION and data transfer), or you need to do.

    The data is stored in segments. There is only a SINGLE segment for a table not partitioned. A partitioned table has a segment for each partition created. A subpartitioned table has a segment for each subpartition created.

    The SPLIT operation create two partitions where it existed before, but the partition structure is the SAME.

    To change the partition structure you need a new table and you need to move ALL the data.

  • Split partition - index / local

    Hi friends,

    I'm trying to divide a table partition.

    Please let me know if the syntax below are correct.

    If the local index used

    ALTER TABLE SNYT. PART_ESTD
    ESTD_M13_S22 PARTITION SPLIT TO ('IS', 13, '22')
    IN (ESTD_M13_S21 PARTITION, PARTITION ESTD_M13_S22)
    update of the index;

    (by http://asktom.oracle.com/pls/asktom/f?p=100:11:0:::P11_QUESTION_ID:1401247200346349807)
    =================================================================

    If used Global indexes

    ALTER TABLE SNYT. PART_ESTD
    ESTD_M13_S22 PARTITION SPLIT TO ('IS', 13, '22')
    IN (ESTD_M13_S21 PARTITION, PARTITION ESTD_M13_S22)
    UPDATE GLOBAL INDEXES;

    Concerning
    KSG

    Published by: KSG on 23 August 2012 18:27

    Published by: KSG on 23 August 2012 18:51

    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_3001.htm#i2131218

    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_3001.htm#i2151566

  • How to split the PHONE NUMBER in the column of database?

    Hello - how to split the telephone within the same column number?

    Existing column PHONE data

    3711943

    8744723

    8487928

    3349262

    I want to split the data in the same

    371-1943

    874-4723

    etc...


    Is this possible? I need to do this only through SQL query not PL/SQL.



    SUBSTR (your_col, 1, 3). » -'|| SUBSTR(your_col,4)

  • Split the string number

    Hello

    I have string like below, and I want to divide and insert the numbers in another column.

    Example of

    ---------------

    test012345

    ABC] 9876

    Output should be as below so that once I am able to split can insert into 2 separate table columns

    test 012345

    ABC] 9876

    Try this

    with t as

    (

    Select 'test012345' c all the double union

    [Select ' abc] 9876' double

    )

    Select col1, col2 regexp_replace(c,'[^[:digit:]]') t regexp_replace(c,'[[:digit:]]')

    COL1 COL2

    ---------- ----------

    test 012345

    ABC] 9876

    2 selected lines.

  • Split line in number of lines

    SELECT value FROM lsw_epv_var_value VSD
    JOIN lsw_epv E ON E.epv_id = EVV.epv_var_id
    AND E.name = "AcessoTodasRegionais."
    AND VSD. EPV_VAR_VALUE_ID = (SELECT MAX (EPV_VAR_VALUE_ID) FROM LSW_EPV_VAR_VALUE VSD JOIN lsw_epv E ON E.epv_id = EVV.epv_var_id AND E.name = "AcessoTodasRegionais" WHERE EFFECTIVE_ON < = SYSDATE)

    The result of the above query is

    tw_admins_internal, Diretoria de Negocios Nacional, Administradores Teamworks

    As you can see, the result is divided by commas, I need to convert this result in number of lines like below

    tw_admins_internal
    Diretoria Negocios Nacional
    Administradores Teamworks

    How I do that?

    Thank you

    Example of

    with t as (select 'SCOTT,ALLEN,KINDGDOM' as in_cls from dual)
    select regexp_substr(in_cls, '[^,]+', 1, rownum) req_empno, rownum rn
                      from t
                      connect by rownum <= length(regexp_replace(in_cls, '[^,]'))+1
    /
    
    REQ_EMPNO                    RN
    -------------------- ----------
    SCOTT                         1
    ALLEN                         2
    KINDGDOM                      3
    
    3 rows selected.
    

    SS

  • Best way to split the large partition to few smaller

    Hello

    I have Oracle 11.2 EE on Redhat 5.9 and I need to solve the problem with partitioning.

    A few tables of some system has been prepared for partitioning a few years ago. But no partitioning was done and all these tables / global index have only one partition for all data.

    Now, we have a lot of tables and indexes with a single partition (with limit MAXVALUE) for all data. I would like to divide this large partition to smaller partitions more by quarter of the year.

    Example:

    Existing partition that d0201_2008_1q must be split at D0201_2008_2Q, D0201_2008_3Q... MYTABLE_2014_4Q of column DATE/NUMBER

    I tried to generate a script for sharing partitions

    ALTER INDEX I_D0201 CHANGE DEFAULT TABLESPACE INDX_2008_1Q ATTRIBUTES;

    ALTER TABLE SPLIT PARTITION D0201_2008_1Q AT (1000456) D0201

    INTO (PARTITION D0201_2008_XX TABLESPACE DATA_2008_1Q, PARTITION D0201_MAX1) 16 PARALLELS;

    ALTER TABLE D0201 CHANGE THE D0201_2008_XX REBUILD UNUSABLE LOCAL INDEX PARTITION;

    ALTER INDEX I_D0201 CHANGE DEFAULT TABLESPACE INDX_2008_2Q ATTRIBUTES;

    ALTER TABLE SPLIT PARTITION D0201_MAX1 AT (1000547) D0201

    INTO (PARTITION D0201_2008_2Q TABLESPACE DATA_2008_2Q, PARTITION D0201_MAX2) 16 PARALLELS;

    ALTER TABLE D0201 CHANGE THE D0201_2008_2Q REBUILD UNUSABLE LOCAL INDEX PARTITION;

    ALTER INDEX I_D0201 CHANGE DEFAULT TABLESPACE INDX_2008_3Q ATTRIBUTES;

    ALTER TABLE SPLIT PARTITION D0201_MAX2 AT (1000639) D0201

    INTO (PARTITION D0201_2008_3Q TABLESPACE DATA_2008_3Q, PARTITION D0201_MAX3) 16 PARALLELS;

    ALTER TABLE D0201 CHANGE THE D0201_2008_3Q REBUILD UNUSABLE LOCAL INDEX PARTITION;

    ...

    It separates great score to two new partitions. One of them is the next quarter and secondly will separate again.

    Some partitions have a few GB and splitting takes a long time (hours for a split partition) and big disk space is also required.

    New partitions will be smaller, but first 2008_1Q partition size will be unchanged, and I'll need to reclaim the unused space somehow.

    You have a better/more rapid solution of ideas?

    Cardel wrote:

    I used DBMS_REDEFINITION once for the change not partitioned to partitioned table. But now, I have an existing partitioned table with a single partition and I want to do a simple process to divide.

    DBMS_REDEFINITION or EXPDP/IMPDP may be faster for execution, but a lot of time for preparation. I have aprox. 60 tables with some clues the and global.

    with DBMS_REDEFINITION, you have no downtime.

    ORACLE-BASE - Table online redefinition improvements in Oracle Database 10g Release 1

    DBMS_REDEFINITION.sync_interim_table

    ----

    Ramin Hashimzade

  • Split hash partition.

    I have a system of production with a table that was created with the following configuration:
    CREATE TABLE CUSTOMER
    (
      CUSTOMER_ID                  NUMBER(18),
      DEFAULT_LANGUAGE_ID          NUMBER(18),
      COMPANY_ID                   NUMBER(18),
      CUSTOMER_NAME                VARCHAR2(100 BYTE),
    
    )
    TABLESPACE CUSTOMER_DATA
    PARTITION BY HASH (CUSTOMER_ID)
    (  
      PARTITION CUSTOMER_TAB_P01
        TABLESPACE CUSTOMER_DATA
    )
    NOCOMPRESS 
    NOCACHE
    NOPARALLEL
    MONITORING
    /
    The table was created incorrectly with just a single partition, now I need to split from 1 to 10 scores.
    I can't find how to divide a hash partition, partitions lie.

    How can I split without using a DEC and replace the table with a nine, as education split partition for the partition of the range?

    Thanks for the help.

    Best regards
    Ricardo Tomas

    >
    The table was created incorrectly with just a single partition, now I need to split from 1 to 10 scores.
    I can't find how to divide a hash partition, partitions lie.

    How can I split without using a DEC and replace the table with a nine, as education split partition for the partition of the range?
    >
    You can not.

    You could ADD a hash partition, but do not use this method: each ADD would result in ALL existing data being re-hashed.

    By doc VLDB and partitioning
    http://docs.Oracle.com/CD/E11882_01/server.112/e25523/part_admin002.htm#i1007318
    >
    Adding a Partition to a partitioned Table Hash
    When you add a partition to a partitioned hash table, the database fills the new partition with lines perceived from an existing partition (chosen by the database), as determined by the hash function. Therefore, if the table contains data, then it can take a while to add a hash partition.
    >
    The only options you really need to use DBMS_REDEFINITION or CTAS you mentioned.

    And first of all you should re-evaluate whether the same should table be partitioned.

    What were the reasons to choose the partition table? Why 'hash' partitioning?

    What is the cardinality of company_id? If it is unique, so, what do you gain by partitioning?

  • What are the consequence of partition Split

    I use 11.2.0.2 database.

    I ORA-14074 error that says that if you already have a MAXVALUE you abandon the partition that encompasses the MAXVALUE or split the partition.
    So I want to use split partition option via the Sub statement.

    ALTER table
    TableName
    Split partition
    partmax (XXX)
    in
    (partXXX of the partition, partition partmax);

    Please can someone tell me the consequence of this statement.
    I am concerned about the existing data in the table by any change will is removed and on the index, what I have to rebuild, etc.

    I have to do this on the produciton.
    I can't test that I do not have a test environment and the table is to have 70 million documents and we do not have time/material resources to recreate it by export and import in a different database.

    Please advise on the "BOLD" above the text.

    Use the UPDATE INDEX clause if you want to keep the usable undexes.

  • ORA-14080: partition cannot be split along the specified high limit

    Hi guys,.

    I try to divide a new partition MD_PROV_201207, but hit error ORA-14080: partition cannot be split along the specified upper limit.
    My code as below, please help make sure my code is there any problem. Thank you.

    ALTER TABLE SPLIT PARTITION abc_201206 table_owner.abc
    AT (TO_DATE ('20120801', 'SYYYYMMDD'))
    INTO (PARTITION tbsp_abc, PARTITION abc_201207 TABLESPACE tbsp_abc TABLESPACE abc_201206);


    HIGH_VALUE PARTITION_POSITION NOM_PARTITION
    --------------- ------------------------------ --------------- ------------------------- ------------------ ------------------------------
    abc_201203 '20120401' 1
    abc_201204 '20120501' 2
    abc_201205 '20120601' 3
    abc_201206 '20120701' 4
    MAXVALUE DEF 5

    SagiGal wrote:
    Error again.

    ALTER TABLE SPLIT PARTITION DEF table_owner.abc
    AT (TO_DATE ('20120801', 'SYYYYMMDD'))
    IN (PARTITION, PARTITION DEF abc_201207)
    ;

    ERROR on line 1:
    ORA-14080: partition cannot be split along the specified high limit

    Is the partition that I shared is incorrect?

    Seems that you have high bound
    Action: make sure the limit along which a partition is to be shared together
    lower than that of the partition to be sliced and higher than that of a
    partition immediately preceding the one to be split

    See also Metalink
    ORA-14080 during an attempt to split a Partition. [100299.1 ID]

    Osama...

Maybe you are looking for