Move table Partition Composite

Hello

I use 11.2.0.3.0 version of oracle. I intend to pass an array to a different tablespace composite partition(range-hash). And I was under the assumption by moving the subpartition / the index of the table, it will move the wholw table. Here's the scenario.

Now I have moved all the subpartition of a table / index in the new tablespace, using below command.

ALTER table t1 move subpartition t1_sub1 tablespace new_tablespace;

ALTER index rebuild subpartition id1_sub1 tablespace new_ind1_tablespace id1;

but when I ask dba_tab_subpartition I see the tablespace again against the subpartition name but when I the dba_tab_partitions data dictionary query I see the name of the old tablespace against the name of the partition. And I am running under instruction to move the partition

ALTER table t1 move the partition t1_p1 tablespace new_tablespace;

It gives error saying: ORA-14257: cannot move the partition other than a partition of the range, list, system, or hash.

933257 wrote:

Hello

I use 11.2.0.3.0 version of oracle. I intend to pass an array to a different tablespace composite partition(range-hash). And I was under the assumption by moving the subpartition / the index of the table, it will move the wholw table. Here's the scenario.

Now I have moved all the subpartition of a table / index in the new tablespace, using below command.

ALTER table t1 move subpartition t1_sub1 tablespace new_tablespace;

ALTER index rebuild subpartition id1_sub1 tablespace new_ind1_tablespace id1;

but when I ask dba_tab_subpartition I see the tablespace again against the subpartition name but when I the dba_tab_partitions data dictionary query I see the name of the old tablespace against the name of the partition. And I am running under instruction to move the partition

ALTER table t1 move the partition t1_p1 tablespace new_tablespace;

It gives error saying: ORA-14257: cannot move the partition other than a partition of the range, list, system, or hash.

I think that it is essentially a bug: a partition with subpartitions is not a segment, so it can ' t have a tablespace. The dba_tab_partitions.tablespace_name column should not be filled at all in this circumstance.

The ora-14257 is also silly: you really need a message saying that you can not move a partition with subparts, because she has no physical existence.

Tags: Database

Similar Questions

  • Move the partition of the table and get ORA-14006: invalid partition name

    I'm using oracle 11.2.0.4 and I am trying to move a partitioned table to one tablespace to another.  I checked may times and I have the correct table name and the name of the partition.  However, I get the error ora-14006.

    Can see everything what could be the problem?

    SQL > ALTER TABLE GWPROD. QRY_TES_ROLLINGCUREDITS MOVE PARTITION 201112 TABLESPACE GW_PROD_T2 PARALLEL (DEGREE 4) NOLOGGING;

    ALTER TABLE GWPROD. QRY_TES_ROLLINGCUREDITS MOVE PARTITION TABLESPACE GW_PROD_T2 PARALLEL (DEGREE 4) NOLOGGING 201112

    *

    ERROR on line 1:

    ORA-14006: invalid partition name

    Thanks in advance.

    Names that begin with numbers are not legal partition names. A fool created by placing them between double quotes. You will need to do the same.

  • Table partitioning/indexing strategy

    Hello

    I have a data warehouse containing medical data. Normally, we develop queries against a small number of patients (e.g. where patient_id < 100) and adjust upward to run on a greater number (usually the entire base of 26 000 patients least some due to exclusion criteria).

    The largest table contains about 200 million lines, and I'm working on the question of whether I can change the partitioning and indexing in order to improve the performance of queries.

    The table contains 'patient_id', 'visit_id', 'item_id', 'chart_time', 'value' and 'valuenum' column and a variety of other columns that are rarely used. The id id columns are integers, pointrefers to the type of value is saved and value (varchar2) and valuenum (number) contain the data. chart_time is a "timestamp with time zone '.

    Currently, there are clues on patient_id, visit_id and item_id and a composite index on (visit_id, itemid). There is no partitioning for the moment.

    1. is the current index redundent? that is visit_id, item_id and composite (visit_id, item_id) do I need?
    2. we started to run queries of time based for specific patients. that is, we want data for specific items, for a specific set of visits, in the first day. An index on (visit_id, chart_time, item_id) would help with that?
    3. the table of patient_id partitioning help? We "never" queries between patient and therefore the data of each patient are independent. The database is running on 2 raid controllers, one for data, one for the index, perhaps it would be better to put half of patients on a single controller, and the other half on the other?

    Thank you

    Dan Scott

    Hello

    1. the index on visit_id sounds redundant as it is the main column in the composite index (visit_id, itemid).
    2. added chart_time to the composite index could be useful that the pair of columns (visit_id, item_id) is not quite selective. You must put in place a realistic model of your data distribution, choose some queries that you intend to run often watch their performance. It is not possible to predict performance in function purely thereotical reasoning.
    3 bear partitioning functions: maintenance of data (for example truncating, deleting or moving old partitions) and eliminating the irrelevant data in queries (partition size). You imagine you having to truncate, delete, or move a partition that is defined by a range of patient_id? Probably not. Can you imagine the need to restrict your query to a certain range of patient_id? Unlikely. That answers your question.

    Best regards
    Nikolai

  • Slow running queries on a table partitioned by date

    I have a table partitioned by COLDATE, when I write a query to get the data is slow, even if I try to only get 1 day data. How can I correct this query runs faster?

    Oracle Version: 10g

    Number of lines:

    See the below query

    select COL1, COL2 RANK() OVER (PARTITION BY   COL1, COLDATE ORDER BY OTHER_DATE DESC) SHOW_RANK
    from 
    SAMPLETABLE
    where COLDATE BETWEEN '01-JAN-2015' AND '01-JAN-2015'
    
    
    create table SAMPLETABLE
    (
      COL1   NUMBER(10) not null,
      COL2        NUMBER(10) not null,
      COLDATE       DATE not null,
      OTHER_DATE DATE
    )
    partition by range (COLDATE)
    (
      partition PARTITION_01_2015 values less than (TO_DATE(' 2015-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace MYTABLESPACE_2015
        pctfree 20
        initrans 1
        maxtrans 255
        storage
        (
          initial 64K
          minextents 1
          maxextents unlimited
        ),
      partition PARTITION_02_2015 values less than (TO_DATE(' 2015-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace MYTABLESPACE_2015
        pctfree 20
        initrans 1
        maxtrans 255
        storage
        (
          initial 64K
          minextents 1
          maxextents unlimited
        ),
      .
      .
      .
      .
      .
      .
      partition PARTITION_12_2016 values less than (TO_DATE(' 2017-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace MYTABLESPACE_2016
        pctfree 20
        initrans 1
        maxtrans 255
        storage
        (
          initial 64K
          minextents 1
          maxextents unlimited
        )
    

    Force the session in parallel mode and check with the parallel hint option.

    SQL > alter session force parallel dml.

    SQL > select / * + parallel (table_name, none of the servers) * / colA, colB from table_name;

  • DBA_TABLES. NULL for tables partitioned, yet Nom_tablespace DBMS_METADATA. GET_DDL displays a name...

    Hello

    Hence the name of tablespace comes when you make one

    ~ Select DBMS_METATDATA. GET_DDL ('TABLE', 'tname', 'owner')...

    on a table partitioned, where you see things like:

    ~ CREATE TABLE...

    ~ ...

    ~ STORAGE(INITIAL 134217728 NEXT 134217728 MINEXTENTS 1 MAXEXTENTS 2147483645)

    (~ DEFAULT USER_TABLES)

    ~ TABLESPACE "ABCD_LOGD2".

    before all the blocks related to the different partitions of this table, where a

    ~ Select nom_tablespace from dba_tables where table_name = 'TNOM '...

    Returns a null value?

    Whence dbms_metatdata this ABCD_LOGD2 value? (in what dictionary?,)

    DBA_SEGMENTS/extents display only the partitions information...)

    Thank you...

    SEB

    Hello

    What is the value of 'deffered_segment_creation '.

    Take a look of it

    Select def_tablespace_name in the dba_part_tables where table_name = 'tname'--> your table

    Concerning

  • Table partitioning

    I have a table in my DB with stored more then 24 million and is growing every day. Growth rate increases with the passage of time. I want this partition table, in such a way that three first partitions such as each partition contains 10 years of data, and the remaining partition such as each partition contains data for 5 years.
    This is the first time that I am any table partitioning, I understand following sql is not correct, I need your help in resolving this issue.
    ALTER TABLE cb_pen_pmt_slip_dtl
    ADD
    PARTITION BY range (payment_date)
    INTERVAL (NUMTOYMINTERVAL(5,'YEAR'))
    (PARTITION p1 VALUES LESS THAN (TO_DATE('2000-01-01','YYYY-MM-DD'))
    partition p2 values less than (maxvalue));

    Hello

    This link can help you...
    >

    Kind regards

  • Table Partitioned parallelized vs

    Hello
    (11.2 server, OS = OL5)

    I have a table that contains more than 50 million lines. I created this table with option 'parallel degree (x).

    It seems that the time required to execute a query on this table does not change when I share that, for example partition range dividing the table to 3 partitions.

    (access the request a unique index in the table and the query criteria match exactly one of the partitions)

    the question:
    1. What is the difference of strategy parallelism between «Parallel degree...» "and the"Division "?
    2. which of them are better in what scenario?
    3. is it better to use PARALLEL_AUTOMATIC_TUNING?
    4 and especially why the performance doesn't change even with a local index on the partitions?

    Thank you
    SMSK.

    >
    It seems that the time required to execute a query on this table does not change when I share that, for example partition range dividing the table to 3 partitions
    . . .
    (access the request a unique index in the table and the query criteria match exactly one of the partitions
    . . .
    @Adam Martin: thanks, but I was explained to question 4 that the performance does not change when I toggle locality index.
    >
    I do not see why it would be necessarily change just of partitioning. What is your reason to think so?

    If the index access is used it is basically to get the IDENTIFIER of a line of interest. The line can then be retrieved using the ROWID. The recovery time will be essentially the same way regardless of the line in a partitioned table or non-partitioned table, and regardless of whether the line of partition. This is because the ROWID is (simple explanation here) a FILE ID (which file?), a BLOCK number (relative block in the file) and a LINE NUMBER (which line in the block. It doesn't matter if the segment that is the block is a segment of the table, partitioned table segment, segment index, etc.

    It is the only factor that COULD change the time of the query when the index is used if the access of the index itself is more effective when the table is partitioned when the table is not partitioned.

    Clearly if it is an overall index, there is a change since the index access itself will be the same.

    The only factor now that MIGHT change the time of the request is so if 1) the index is changed locally and 2) the local index has a different structure than the old index that allows to find the best performing required index entries.

    You have not published information on the index of structure, so let me give you an analogy which shows a scenario where it is clear that the access to the index would not change.

    Assume that the overall index is analogous to a catalogue of cards with 26 entries - one for each letter of the alphabet. My query accesses the entries beginning with the letter 'F' As discussed above in table access to aid a ROWID obtained from the index will be the same, if the table is partitioned or not.

    So now I have the partition table and have 26 partitions - one for each letter of the alphabet.

    With the help of the global index of the access to the partition of 'F' will be the same.

    Now, if I create a local index (instead of global) it's almost as if I now 26 index, one for each letter of the alphabet. The first entry for the 'F' in the global index can be found by reading the root node and perhaps one or two other nodes - then that an index scan can be performed.

    The first entry for the 'F' in the local index is at the beginning of the index - no need to jump or to do a binary search to ignore the 'A', 'B', etc. entered.

    This time difference is microscopic.

    Once I found the first entry for the 'F' either in the overall index, or local 'F' remaining entries in the index are consecutive, so access time will be the same.

    I don't know if there is a structural difference between the indices and the that you tried, but the above should show if the structure (order) has not changed it would not be a noticeable difference in access.

  • Become table partitioning

    Hi I have a table where about 260 bln + records. and actionaly of infromation inserted. the structure of the table.

    CREATE TABLE NUM_CALLS
    (
    NUMBER OF N_BLK
    NUMBER,
    NUMBER OF SRV_A
    NUMBER OF SRV_B
    NUMBER OF IND_B
    START DATE,
    NUMBER OF PTT,
    NUMBER OF AIR,
    NUM VARCHAR2 (2000 BYTE),
    NUMBER OF HARD,
    VARCHAR2 (240 BYTE) SERVICES,
    STATUS VARCHAR2 (1 BYTE),
    VARCHAR2 (240 BYTE) DSC,
    INCOMING NUMBER,
    THE NUMBER LEAVING,
    NUMBER OF BILLPAR
    NUMBER OF AIR_SUB
    NUM_A VARCHAR2 (2000 BYTE),
    NUMBER OF PTT_SUB
    DIR CHAR (1 BYTE).
    YOUR VARCHAR2 (5 BYTE)
    NUMBER OF PTT_TOLL
    NUMBER OF R_ROAMFILE_SEQ
    NUMBER OF INDICATED,
    NUMBER OF SRV_TOLL
    PTT_TOLL2 NUMBER,
    SRV_TOLL2 NUMBER,
    IMEI VARCHAR2 (50 BYTE),
    RTYPE VARCHAR2 (10 BYTE),
    NUMBER OF R_MSCID
    NUMBER OF R_CALLS_LOG
    NUMBER OF UTC,
    NUMBER OF TRANSACTIONS,
    NUMBER OF SRC_SEQN
    NUMBER OF FWD_TYPE
    NUMBER OF TM_EVENTS
    DST VARCHAR2 (20 BYTE),
    ACCUM RAW (2000).
    UTTYPE CHAR (1 BYTE),
    TM_MODIFIERS RAW (2000)
    )
    TABLESPACE CDR
    PCTUSED 40
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE)
    80K INITIAL
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    DEFAULT USER_TABLES
    )
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    NOMONITORING;

    There is no primary key on the table, and this table records are not unique.



    I want to become this table partitioning column by TRT (date) by date. is it possible to become the partitioning table after and if this table actionaly used? If possible then how can I do?

    Create the new table with a different name, but same structure as NUM_CALL with no data ex create table new_table in new_table select * from YOUR_TABLE_NAME where 1 = 2;
    or just get ddl for the use of this table:

    SELECT DBMS_METADATA. GET_DDL('TABLE','YOUR_TABLE_NAME') FROM dual;

    Modify this script, create the new table, and then create the partition you want (daily, monthly, annual) of course you can also create a subpartition.

    prepare a few anonymous PLSQL block, and then insert the data into the new partition table, that's all.

    stop the execution of the process, drop old table and rename the new table with the old name (deleted table)

  • Why cannot create the table partitioned successfully?

    Why cannot create the table partitioned successfully?
    SQL> create table hr.gps_log_his
    (id number,
    name varchar2(10),
    time date)
    tablespace ts_log_his
    PARTITION BY RANGE (TIME)
    (PARTITION udp_part09110707 VALUES LESS THAN (TO_DATE('09110708','yymmddhh24')),
    PARTITION udp_part09110708 VALUES LESS THAN (TO_DATE('09110709','yymmddhh24')),
    PARTITION udp_part09110709 VALUES LESS THAN (TO_DATE('09110710','yymmddhh24')),
    PARTITION udp_part09110710 VALUES LESS THAN (maxvalue)
    );
    
    (PARTITION udp_part09110707 VALUES LESS THAN (TO_DATE('09110708','yymmddhh24')),
    Error on line 7: 
    ORA-14120: DATE columns did not specify the complete partitioning limits.

    The detailed error message is as follows:

    ORA-14120: incompletely specified partition bound for a DATE column
    
    Cause: An attempt was made to use a date expression whose format does not fully
    (i.e. day, month, and year (including century)) specify a date as a partition bound
    for a DATE column. The format may have been specified explicitly (using TO_DATE()
    function) or implicitly (NLS_DATE_FORMAT).
    
    Action: Ensure that date format used in a partition bound for a DATE column supports
    complete specification of a date (i.e. day, month, and year (including century)). If
    NLS_DATE_FORMAT does not support complete (i.e. including the century) specification
    of the year, use TO_DATE() (e.g. TO_DATE('01-01-1999', 'MM-DD-YYYY') to fully
    express the desired date. 
    

    Action: Change to_date('09110708','yymmddhh24') to
    to_date('2009110708','yyyymmddhh24')

  • Move Tables an index to the new storage facilities

    Hello

    I have two tables IEFSENCY_TAB and IEFSENCY_IDX, first areas contain tables and the second is the index.
    The IEFSENCY_TAB, I have to separate 3 DASC, DSUBEX and tables DOBJ who has 57 MB and 4 GB, 9 GB, new storage spaces.
    These tables have the following index on the IEFSENCY_IDX tablespace:
    DASCI2, DASCI3 table DASC.
    DOBJI1, DOBJI2, DOBJI3, DOBJI4 of DOBJ table
    DSUBEXI1, DSUBEXI2, DSUBEXI3 in table DSUBEX.

    Can I use the its sql following to move tables to the new tablespace:

    on the case of DOBJ, for example:

    ALTER table DOBJ move tablespace IEFSENCY_TAB2;

    ALTER index rebuild tablespace IEFSENCY_IDX2 DOBJI1;
    ALTER index rebuild tablespace IEFSENCY_IDX2 DOBJI2;
    ALTER index rebuild tablespace IEFSENCY_IDX2 DOBJI3;
    ALTER index rebuild tablespace IEFSENCY_IDX2 DOBJI4;


    Hello

    I did the following:

    SQL > create tablespace IEFSENCY_TAB2
    2 datafile 'L:\DataENCY\tabENCY_SUB.dbf '.
    3 size M 100
    4 extent management local uniform size 1 M;

    Created tablespace.

    SQL >
    SQL > create tablespace IEFSENCY_IDX2
    2 datafile 'L:\DataENCY\idxENCY_SUB.dbf '.
    3 size M 100
    4 extent management local uniform size 1 M;

    Created tablespace.

    SQL > alter system table. DSUBEX move tablespace IEFSENCY_TAB2;

    Modified table.

    SQL > alter the indexing system. DSUBEXI1 reconstruction tablespace IEFSENCY_IDX2;

    The index is modified.

    SQL > alter the indexing system. DSUBEXI2 reconstruction tablespace IEFSENCY_IDX2;

    The index is modified.

    SQL > alter the indexing system. DSUBEXI3 reconstruction tablespace IEFSENCY_IDX2;
    change the indexing system. DSUBEXI3 reconstruction tablespace IEFSENCY_IDX2
    *
    ERROR on line 1:
    ORA-01652: unable to extend segment temp of 128 in tablespace IEFSENCY_IDX2

    How can I solve this error?

    Thank you
    BEA.

    ORA-01652: unable to extend segment temp of 128 in tablespace IEFSENCY_IDX2

    Published by: user641364 on 17-Apr-2009 05:22

    Well, I did add the new data file in the IEFSENCY_IDX2 tablespace, I guess I should calculate the size of the index to rebuild

    Published by: user641364 on 17-Apr-2009 05:57

    This is exactly the solution. Consider defining new storage pamateres if you like to shrink space

  • Possible to Exchange temporary table with composite range-hash partitioned table?

    Hello

    Using oracle 11.2.0.3

    We want to clean up the data in some of our existing partitioned table.

    Afetr updates check spped that is too slow for us.

    Current table is partitioned the inetrval compoiste range-hash table.  Also it is compressed - enabled for compression of basis as well

    An interval of 1 month and 1 partition by month and 4 secondary partitions in the partition of ecah.

    You want to create tenp table with the data of celan and exchange the data in this table in the 'dirty' uisng existing partitions partition exchnage.

    Is this possible?

    The plan is

    1) create temporary table containing data for 1 partition (1 month worth of data)

    (2) clean the data here

    (3) create new temporary table with these specific data which compressed and discovered partitioned with 4 secondary partitions

    (4) table 3 for swap partition dirty using partition excahnge.

    Thaks

    I think that this can be done with a combination of Exchange and Split partition partitions. Prior to Oracle 11 g, only way of redefining tables online was DBMS_REDEFINITION package. Now, you can redefine the use of partitions for Exchange & Split. Check

    http://www.Oracle-base.com/articles/Misc/partitioning-an-existing-table-using-Exchange-partition.php

    Maintenance of Partitions

    Kind regards

  • T530 - Move boot partition "SYSTEM_DRV"?

    Hi all

    I just bought a blue WD 1 TB drive to replace the stock 320 HDD in my T530. I have Win7 installed on an mSATA SSD 256GB. However, when readers to discuss, BIOS recognizes both drives but the laptop will not boot - from SSD or HARD disk.

    I suspect this is related to the partition of mysterious "SYSTEM_DRV" on my 320 GB HARD drive. I considered changing the partition tables and the copy of this partition on a score of similar size on the SSD, but I have a bad feeling about messing around with partition editors when I'm positive, not exactly what I'm doing. I have a set of discs of recovery when I first set up the computer, but as far as I KNOW this will restore the laptop to 'presets' which is a configuration that does not start a SSD installed.

    I have not really tried something drastic because I thought that I would consult the forum before scribbling with my partitions or try a new installation of Windows. Is there a way I can move (risk free) this partition so he can start fully from the mSATA SSD?

    -edit: it should also be noted that I tried to reimage the drive using DriveImage XML, but it doesn't recognize the "SYSTEM_DRV" partition, otherwise who would have seemed failsafe. Is there a tool I need to use what is not 'hot', as a bootable drive?

    Another update:

    Turns out I have a very inadequate knowledge of the score and the MBR. I downloaded a tool called "EasyBCD" which has an option to 'change the startup disk '. In about 5 seconds, it moves the information on my SSD and prompt to restart the computer. To test this, I removed the HARD drive to see if my cell phone could launch with only the SSD - it can!

    I want to thank the community for their support.

  • Create no partition Table partitioning

    Dear all,

    I have a table that is not partition, and it has about 20 G data... If I want that table with say DATE_M partition column

    Please can anyone suggest the best way to do it.

    Thank you

    To create a partitioned table

    (1) you must make a backup of the existing one you can take expdp or DEC

    (2) remove the table and create the same table now with partitions (a minimum score is required)

    you want a range of ex-based partition if you use a date column

    (3) loading data from the previous table into the new partitioned table, either by DEC or impdp, the inserts will be automatically in their respective partitions and you don't mention explicitly.

    Their is no other possible way to partition a non partitioned table, you can do than workarounds to minimize the downtime of the table trying different ways to load data into the partitioned table.

    You can use the enable row movement clause of create table and also use local indexes for easy maintenance partition.

  • table partitioned and unique keys

    I really don't understand why Oracle does not apply in some cases, unique keys.

    Let's say I have a table

    create table t (t_type not null, t_key not null, id not null, not null value)

    list partition (t_type)

    (

    type1 partition values ('ppp1"),

    rest of partition (default) values

    ) as

    Select "ppp" | rownum, rownum, rownum, rownum of double connect by rownum < = 100;

    And following changes in the indices for unique keys

    -1

    create index idx_1 on t (t_key, id);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    ALTER table drop constraint t_uk drop index;

    -2

    create index idx_1 on t (t_key, id, t_type);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    ALTER table drop constraint t_uk drop index;

    -3

    create index idx_1 on t (t_key, id, t_type) local;

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -4

    create an index only idx_1 on t (t_key, id);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -5

    create an index only idx_1 on t (t_key, id, t_type);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -6

    create an index only idx_1 on t (t_key, id, t_type) local;

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -7

    create index idx_1 on t (t_key, t_type, id) local;

    ALTER table t add t_uk unique constraint (t_key, t_type) using index idx_1;

    ALTER table drop constraint t_uk drop index;

    -8

    create an index only idx_1 on t (t_key, t_type, id) local;

    ALTER table t add t_uk unique constraint (t_key, t_type) using index idx_1;

    Drop index idx_1;

    I got the set of questions:

    1. first and second cases were performed with success while 4th and 5th failed.

    The only difference is that the overall index in 4th and 5th cases are unique.

    It is unclear why ' ORA-14196: specified index cannot be used to apply the constraint. ' has occurred.

    2. in the third case index is similar to that in second place with the only difference that it is local.

    Still, it is not clear why it failed with ORA-14196.

    3 and the last question why ORA-14196 arose in 8 cases, while the 7th, it didn't.

    The only difference is the local index in 8 cases is unique.

    Thank you

    Hi Alex

    (1) index 4 and 5 cannot be used to police the unique constraint as a unique index must have the same list of column under duress. Index 4, to establish in a non-unique index or to remove the column id of the index. To index 5, you will need to make a non-unique index or remove the columns id and index t_type.

    (2) 3 index cannot be used to the unique constraint of police that it is a local index and is not partitioned column (t_type) in both the definition of index/constraint. If allowed, this would require Oracle having to visit each partition to ensure that any new value of t_key is truly unique, that would not scale. Include the t_type column in the constraint and the index to both t_type and t_key as of the columns (so move the id column 3rd position) and it would be successful.

    (Index 3) 8 fails for the same reason as in 1). It's a unique index with a different column from the constraint list. Remove the id column of the index or to make it a non-unique index and it will be successful.

    In summary, a unique index MUST have the same list of column than the constraint and a local index MUST have the partitioning columns in both the definition of index/constraint.

    See you soon

    Richard Foote

    http://richardfoote.WordPress.com/

  • OLTP Table partitioning

    Hello

    I have a table (not partitioned) transactions, in an OLTP which is always get a lot of inserts (lines 600 million per day)

    1. I need to archive this table each month to the historical database (oldest months exist in the transactions table)
    2 - this table is usually strongly questioned by using CONNOTE_NUMBER and sometimes EVENT_DATE
    3 - queries are performing well by using the current design

    What is the best partitioning can I do in this scenario that I move to GR 11, 2? It's worth (I think that it is only good for archiving)?


    Here is the current design
    CREATE TABLE MOVEMENTS
    (
    CONNOTE_NUMBER VARCHAR2 (30) NOT NULL,
    PARCEL_NUMBER VARCHAR2 (30) NOT NULL,
    EVENT_DATE DATE NOT NULL,
    RECORD_TYPE NUMBER (2) NOT NULL,
    BRANCH_ID VARCHAR2 (3) NOT NULL,
    ROUTE_ID VARCHAR2 (4) NOT NULL,
    EVENT_SPECIFICS VARCHAR2 (80).
    LAST_TOUCH_USER VARCHAR2 (9) NOT NULL,
    LAST_TOUCH_DATE DATE DEFAULT SYSDATE NOT NULL,.
    UPLOADED_TO_AS400 VARCHAR2 (1) DEFAULT 'N',.
    REASON_CODE VARCHAR2 (2),
    ACTION_CODE VARCHAR2 (2),
    TRANSACTIONS_REFERENCE VARCHAR2 (7).
    RECEIVING_BRANCH_ID VARCHAR2 (4).
    PRE_NINE_SERVICE CHAR (1),
    THIRD_PARTY_ID VARCHAR2 (8).
    DG_IND VARCHAR2 (1).
    WEB_DISPLAY VARCHAR2 (1).
    RELINK CHAR (1)
    )


    CREATE INDEX TRACK_IDX_EVENT_DATE_BRANCH ON TRANSACTIONS
    (EVENT_DATE, BRANCH_ID)

    CREATE INDEX TRACK_UPLOADED_TO_AS400 ON TRANSACTIONS
    (UPLOADED_TO_AS400)

    CREATE INDEX TRACK_IDX_2 ON TRANSACTIONS
    (RECORD_TYPE, EVENT_DATE)

    CREATE A UNIQUE TRACK_PK ON TRANSACTIONS INDEX
    (CONNOTE_NUMBER, PARCEL_NUMBER, EVENT_DATE, RECORD_TYPE)

    CREATE INDEX TRACK_IDX_3 ON TRANSACTIONS
    (CONNOTE_NUMBER, WEB_DISPLAY)

    ALTER TABLE TRANSACTIONS ADD)
    CONSTRAINT TRACK_PK
    _ Of the PRIMARY KEY
    (CONNOTE_NUMBER, PARCEL_NUMBER, EVENT_DATE, RECORD_TYPE)

    Thanks in advance

    rp0428 wrote:
    Billy - the OP has
    >
    1. I need to archive this table each month to the historical database (oldest months exist in the transactions table)
    >

    A finer grain partition window can make a big difference in query performance. A need not only to look at data management (archiving).

    Do you see a monthly rolloff being a problem?

    Originally, my table more busy was range partitioned. As the insertion of the increased rate, so too the problem to get partition the DLL of enforcement against her instructions. Go to a State where I had a second window of zero for DOF on this table. This table was then divided into 100's as individual hash tables is no longer, the statements of the partition could be supported.

    Now if there is a guaranteed window where maintenance type DDL is possible - maybe we can get away with using partitioning on a busy OLTP table. But when OLTP means inserts and transactions every second, 24 x 7, 7 days a week - maintenance DOF on this table will probably be a serious problem.

    Could your other concerns be mitigated by annual creation of partitions following years? Thus, in December of 2012 create 12 partitions that will be needed for 2013. This would mean that only a necessary annual window for the maintenance operation.

    With smaller amounts of data and coarse partitions, it is an option. With finer grain partitions, and tons of data, not really. Yes, you can create new partitions that are sufficient for the next year, or even two. But what you do with the old partitions that must be archived and consume space necessary for new data?

    In order to maintain consumption of space efficient sliding window ito, you age and Archives old partitions (drop/truncate/drop). And cela you can't do once a year during the annual maintenance window.

    Don't tell not the OLTP tables and partitioning are mutually exclusive. Simply say that he should be careful in the choice of your Oracle storage structures when it comes to paintings which gets 1000 times per second. And 600 million row inserts/day (my table more busy doing 3 x only), IMO falling into the category of the think-carefully-and-practise-safe-hex.

Maybe you are looking for

  • How to access these tools, I keep reading comments?

    I want to make sure forwarding is off, but I can't find "Tools"...

  • SDStereoI.dll and Toshiba BluRay disc player

    Recently, whenever I start the Toshiba Blu - Ray disc drive, I get the following error message:Program cannot start SDStereoI.dll is missing on your computer. Try reinstalling the program to fix this problem. (Hidden Window: SMIPlayer.exe - system er

  • Modbus Toolkit NOR is not reliable?

    I'm controlling a Watlow F4 in LabVIEW using the toolkit to add-on modbus.  When I started to write this application, I used some modbus screws that I found in the devzone, but that he was not too keen on the use of unfamiliar code someone else.  I t

  • Transfer of viruses via a terminal server

    A computer infected by a virus transfer the virus to another computer through a terminal server?

  • I have a Dell XP laptop with mouse pad problems.

    I have a Microsoft Wireless Notebook Optical Mouse 3000. It would be a good solution and how do I install it. I can't find anything about compatibility. No matter what I click or try, I still just have sent Windows 7 info.