10g:  How to determine Local Partition Index Space UTILIZATION

I'm trying to determine how much space is actually utilized by different local partition indexes. Some are b-tree and some are bitmap. So far when I query dba_segments and dba_part_indexes I just see space available, not the space utilized.
Does anybody know a way to know the actual space utilized by a local partition index?

Does anybody know a way to know the actual space utilized by a local partition index?SUM(BYTES) from dba_extents
SQL> desc dba_extents
Name                            Null?    Type
OWNER                                  VARCHAR2(30)
SEGMENT_NAME                             VARCHAR2(81)
PARTITION_NAME                         VARCHAR2(30)
SEGMENT_TYPE                             VARCHAR2(18)
TABLESPACE_NAME                        VARCHAR2(30)
EXTENT_ID                             NUMBER
FILE_ID                             NUMBER
BLOCK_ID                             NUMBER
BYTES                                  NUMBER
BLOCKS                              NUMBER
RELATIVE_FNO                             NUMBER

Similar Messages

  • How to simply create a locally partitioned index with a dedicated tablespac

    Dears,
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biSuppose you have a range partitioned table t on date d with n partitions p1, p2,....pn
    If you create a locally partitioned index using the following script
    create index ind_loc on t(d) local;all the partitioned indexes will be created on the same default tablespace.
    Is there a simple creation script (not that where we have to add each partition and each tablespace) to use in order to associate each partitioned index to a given tablespace?
    Best Regards
    Mohamed Houri

    Suppose you have a range partitioned table t on date d with n partitions p1, p2,....pn
    If you create a locally partitioned index using the following script
    create index ind_loc on t(d) local;all the partitioned indexes will be created on the same default tablespace.
    Is there a simple creation script (not that where we have to add each partition and each tablespace) to use in order to associate each partitioned index to a given tablespace?
    Hi Mohamed ,
    AFAIK , there is no such script . If you want partition to be stored in different tablespaces, then you will have to specify partition name along with tablespace name in create index command.
    Regards
    Rajesh

  • Creating Local partitioned index on Range-Partitioned table.

    Hi All,
    Database Version: Oracle 8i
    OS Platform: Solaris
    I need to create Local-Partitioned index on a column in Range-Partitioned table having 8 million records, is there any way to perform it in fastest way.
    I think we can use Nologging, Parallel, Unrecoverable options.
    But while considering Undo and Redo also mainly time required to perform this activity....Which is the best method ?
    Please guide me to perform it in fastest way and also online !!!
    -Yasser

    YasserRACDBA wrote:
    3. CREATE INDEX CSB_CLIENT_CODE ON CS_BILLING (CLIENT_CODE) LOCAL
    NOLOGGING PARALLEL (DEGREE 14) online;
    4. Analyze the table with cascade option.
    Do you think this is the only method to perform operation in fastest way? As table contain 8 million records and its production database.Yasser,
    if all partitions should go to the same tablespace then you don't need to specify it for each partition.
    In addition you could use the "COMPUTE STATISTICS" clause then you don't need to analyze, if you want to do it only because of the added index.
    If you want to do it separately, then analyze only the index. Of course, if you want to analyze the table, too, your approach is fine.
    So this is how the statement could look like:
    CREATE INDEX CSB_CLIENT_CODE ON CS_BILLING (CLIENT_CODE) TABLESPACE CS_BILLING LOCAL NOLOGGING PARALLEL (DEGREE 14) ONLINE COMPUTE STATISTICS;
    If this operation exceeds particular time window....can i kill the process?...What worst will happen if i kill this process?Killing an ONLINE operation is a bit of a mess... You're already quite on the edge (parallel, online, possibly compute statistics) with this statement. The ONLINE operation creates an IOT table to record the changes to the underlying table during the build operation. All these things need to be cleaned up if the operation fails or the process dies/gets killed. This cleanup is supposed to be performed by the SMON process if I remember correctly. I remember that I once ran into trouble in 8i after such an operation failed, may be I got even an ORA-00600 when I tried to access the table afterwards.
    It's not unlikely that your 8.1.7.2 makes your worries with this kind of statement, so be prepared.
    How much time it may take? (Just to be on safer side)The time it takes to scan the whole table (if the information can't read from another index), the sorting operation, plus writing the segment, plus any wait time due to concurrent DML / locks, plus the time to process the table that holds the changes that were done to the table while building the index.
    You can try to run an EXPLAIN PLAN on your create index statement which will give you a cost indication if you're using the cost based optimizer.
    Please suggest me if any other way exists to perform in fastest way.Since you will need to sort 8 million rows, if you have sufficient memory you could bump up the SORT_AREA_SIZE for your session temporarily to sort as much as possible in RAM.
    -- Use e.g. 100000000 to allow a 100M SORT_AREA_SIZE
    ALTER SESSION SET SORT_AREA_SIZE = <something_large>;
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to create a local partition index asign its storage tablespace

    hi
    i see the syntax about create local context index
    quote:
    Syntax for CONTEXT Indextype
    Use this indextype to create an index on a text column. You query this index with the CONTAINS operator in the WHERE clause of a SELECT statement. This index requires manual synchronization after DML.
    CREATE INDEX [schema.]index on [schema.]table(column) INDEXTYPE IS ctxsys.context [ONLINE]
    LOCAL [(PARTITION [partition] [PARAMETERS('paramstring')]
    [, PARTITION [partition] [PARAMETERS('paramstring')]])]
    [PARAMETERS(paramstring)] [PARALLEL n] [UNUSABLE];
    and i try the under code ,all failed.
    SQL&gt; create index html2_idx on HTML2(newsdescription) indextype is ctxsys.contex
    t local (partition indx parameters('lexer my_lexer'),partition indx01 tablespace
    users01 parameters('lexer my_lexer'),partition indx02 tablespace users02 param
    eters('lexer my_lexer'),partition indx03 tablespace users03 parameters('lexer m
    y_lexer') );
    ERROR:ORA-29850
    could anybody show some demo sql code creating partition context index asign its storage tablespace
    thanks

    try:
    create index html2_idx on HTML2(newsdescription) indextype is ctxsys.contex
    t local (
    partition indx parameters('lexer my_lexer'),
    partition indx01 parameters('storage users01_stg lexer my_lexer'),
    partition indx02 parameters('storage users02_stg lexer my_lexer'),
    Create storage preferences users01, users02, .. with I, K, ... attributes for tablespace users01, users02, ...
    Btw, ¿does anyone know whats the upper limit of partitions for a domain index? I've read in OTN they were 9999 but it crashes me (oracle 9.2.0.1) when I have 255... ¿has anyone tried this?

  • Function based local partitioned Index

    Hi,
    Is function based index possible on partitioned column?
    E.g:
    CREATE TABLE MYTABLE
        MY_ID               NUMBER(10)   NOT NULL,
        MY_DATETIME         DATE         NOT NULL,
        MY_ACTIVITY_TYPE    VARCHAR2(1)  NOT NULL,
        MY_CREATE_DATETIME  DATE         NOT NULL,
        MY_BUSINESS_DATE    DATE         NOT NULL,
        MY_EXP_PROCESS_DATE DATE             NULL
    TABLESPACE TABLESPACE_D
    NOLOGGING
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOPARALLEL
    NOCACHE
    PARTITION BY RANGE(MY_DATETIME)
    (PARTITION MYTABLE_2006_JAN VALUES LESS THAN (TO_DATE('02-FEB-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_FEB VALUES LESS THAN (TO_DATE('02-MAR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAR VALUES LESS THAN (TO_DATE('04-APR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_APR VALUES LESS THAN (TO_DATE('02-MAY-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAY VALUES LESS THAN (TO_DATE('02-JUN-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUN VALUES LESS THAN (TO_DATE('04-JUL-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUL VALUES LESS THAN (TO_DATE('02-AUG-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_AUG VALUES LESS THAN (TO_DATE('04-SEP-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_SEP VALUES LESS THAN (TO_DATE('03-OCT-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_OCT VALUES LESS THAN (TO_DATE('02-NOV-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_NOV VALUES LESS THAN (TO_DATE('04-DEC-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_DEC VALUES LESS THAN (TO_DATE('02-JAN-2007','DD-MON-YYYY'))
    NOLOGGING
    CREATE INDEX IDX_MY_TABLLE_DATETIME
        ON MYTABLE(MY_DATETIME,TO_NUMBER(TO_CHAR(MY_DATETIME,'YYYYMM')))
    LOCAL
    PARTITION MYTABLE_2006_JAN,
    PARTITION MYTABLE_2006_FEB,
    PARTITION MYTABLE_2006_MAR,
    PARTITION MYTABLE_2006_APR,
    PARTITION MYTABLE_2006_MAY,
    PARTITION MYTABLE_2006_JUN,
    PARTITION MYTABLE_2006_JUL,
    PARTITION MYTABLE_2006_AUG,
    PARTITION MYTABLE_2006_SEP,
    PARTITION MYTABLE_2006_OCT,
    PARTITION MYTABLE_2006_NOV,
    PARTITION MYTABLE_2006_DEC
    ) PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    TABLESPACE TABLESPACE_I
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOLOGGING
    NOPARALLEL
    NOCOMPRESS
    /Oracle allows me to create the above index(I am using 10g) but in the USER_INDEXES data dictionary, for the above index the STATUS value is N/A. I could able to query also and the explain plan shows this index but my concern is will there be any other performance problem with this type of index?
    Regards,
    Mohana

    Hi,
    Is function based index possible on partitioned column?
    E.g:
    CREATE TABLE MYTABLE
        MY_ID               NUMBER(10)   NOT NULL,
        MY_DATETIME         DATE         NOT NULL,
        MY_ACTIVITY_TYPE    VARCHAR2(1)  NOT NULL,
        MY_CREATE_DATETIME  DATE         NOT NULL,
        MY_BUSINESS_DATE    DATE         NOT NULL,
        MY_EXP_PROCESS_DATE DATE             NULL
    TABLESPACE TABLESPACE_D
    NOLOGGING
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOPARALLEL
    NOCACHE
    PARTITION BY RANGE(MY_DATETIME)
    (PARTITION MYTABLE_2006_JAN VALUES LESS THAN (TO_DATE('02-FEB-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_FEB VALUES LESS THAN (TO_DATE('02-MAR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAR VALUES LESS THAN (TO_DATE('04-APR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_APR VALUES LESS THAN (TO_DATE('02-MAY-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAY VALUES LESS THAN (TO_DATE('02-JUN-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUN VALUES LESS THAN (TO_DATE('04-JUL-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUL VALUES LESS THAN (TO_DATE('02-AUG-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_AUG VALUES LESS THAN (TO_DATE('04-SEP-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_SEP VALUES LESS THAN (TO_DATE('03-OCT-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_OCT VALUES LESS THAN (TO_DATE('02-NOV-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_NOV VALUES LESS THAN (TO_DATE('04-DEC-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_DEC VALUES LESS THAN (TO_DATE('02-JAN-2007','DD-MON-YYYY'))
    NOLOGGING
    CREATE INDEX IDX_MY_TABLLE_DATETIME
        ON MYTABLE(MY_DATETIME,TO_NUMBER(TO_CHAR(MY_DATETIME,'YYYYMM')))
    LOCAL
    PARTITION MYTABLE_2006_JAN,
    PARTITION MYTABLE_2006_FEB,
    PARTITION MYTABLE_2006_MAR,
    PARTITION MYTABLE_2006_APR,
    PARTITION MYTABLE_2006_MAY,
    PARTITION MYTABLE_2006_JUN,
    PARTITION MYTABLE_2006_JUL,
    PARTITION MYTABLE_2006_AUG,
    PARTITION MYTABLE_2006_SEP,
    PARTITION MYTABLE_2006_OCT,
    PARTITION MYTABLE_2006_NOV,
    PARTITION MYTABLE_2006_DEC
    ) PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    TABLESPACE TABLESPACE_I
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOLOGGING
    NOPARALLEL
    NOCOMPRESS
    /Oracle allows me to create the above index(I am using 10g) but in the USER_INDEXES data dictionary, for the above index the STATUS value is N/A. I could able to query also and the explain plan shows this index but my concern is will there be any other performance problem with this type of index?
    Regards,
    Mohana

  • Creating Primary key Index as Local Partitioned Index.

    CREATE TABLE T1(
    x NUMBER,
    y NUMBER
    )PARTITION BY LIST(x)
    PARTITION P1 VALUES (1),
    PARTITION P2 VALUES (2),
    PARTITION Pmax VALUES (default)
    ALTER TABLE T1 ADD CONSTRAINT T1_PK PRIMARY KEY(Y) LOCAL;
    Error starting at line 1 in command:
    ALTER TABLE T1 ADD CONSTRAINT T1_PK PRIMARY KEY(Y) LOCAL
    Error report:
    SQL Error: ORA-01735: invalid ALTER TABLE option
    01735. 00000 - "invalid ALTER TABLE option"
    *Cause:   
    *Action:
    Can you please help me how to achieve this in Oracle 10g R2?

    LOCAL keyword is invalid with ALTER TABLEDepends:
    SQL>  create table t1 (x number, y number)
    partition by list (x)
       (partition p1
           values (1),
        partition p2
           values (2),
        partition pmax
           values (default))
    Table created.
    SQL>  alter table t1 add constraint t1_pk primary key(x, y) using index local
    Table altered.

  • How to find local systems free space?

    Hi all,
    Can any one tell me, how to find C: free space in windows using java?

    You got more than that. You learned where to look for answers.
    Good show!
    db

  • How to find local systems free space in jdk1.5?

    Hi all,
    Can any one tell me, how to find C: free space in windows using jdk 1.5 ?.Thanks in Advance.

    Skowroniasty wrote:
    check this one:
    http://java4ever.blogspot.com/2008/06/disk-space-check.html
    Sigh, why don't you read the links you post? The OP asked for 1.5.

  • Oracle 10g, how to determine allocated memory is healthy or sufficient.

    Hi Guys,
    I have a 10.2.0.5 production database.
    Currently my server has 8GB physical RAM.
    3GB is allocated to the SGA and 1GB to the PGA.
    Let's say one day there is a requirement from application (eg, weblogic) to increase connection pool from 20 to 50.
    How are we able to know whether the memory allocated is sufficient for existing load and also the increased load?
    CPU is quite straightfoward as we can generate out the cpu utilization. If utilization is low, i supposed is quite safe to increase the connection.
    Kindly share ur experiences tackling such situation.
    thanks

    Chewy wrote:
    Hi Guys,
    I have a 10.2.0.5 production database.
    Currently my server has 8GB physical RAM.
    3GB is allocated to the SGA and 1GB to the PGA.
    Let's say one day there is a requirement from application (eg, weblogic) to increase connection pool from 20 to 50.
    How are we able to know whether the memory allocated is sufficient for existing load and also the increased load?
    CPU is quite straightfoward as we can generate out the cpu utilization. If utilization is low, i supposed is quite safe to increase the connection.
    Kindly share ur experiences tackling such situation.
    thankswhat OS name & version?
    is OS 32 or 64 bit?
    is Oracle 32 or 64 bit?
    How do you know the current RAM allocation is adequate or optimal?

  • Estimation of Local Partitioned Bitmap Index size in Oracle

    Its datawarehousing project and the we have around 20 partitioned dimensional tables . The requirement is to create local partitioned bitmap index on almost all columns of dimension tables excluding primary key columns as they are already indexed.We need to estimate the size of index partitionwise.
    Please let me have if there is any ready piece of script which will help me in estimating size of bitmap local partitioned index.

    You may want to look into the DBMS_SPACE.CREATE_INDEX_COST procedure.
    Usage Notes* The table on which the index is created must already exist.
    * The computation of the index size depends on statistics gathered on the segment.
    * It is imperative that the table must have been analyzed recently.
    * In the absence of correct statistics, the results may be inaccurate, although the procedure will not raise any errors.

  • Parallel creation of partitionned index and tablespace Temp size

    Hi,
    I'am not able to find the information if when building in parallel a locally partitionned index, Oracle will iterate on all the partition and then use temp tbs for one partitionned or it will compute for all the partitionned simultaneously ?
    Thanks for your help

    If I understand your question correctly, the temp tablespace is used for sorting, but there are temp segments created in the tablespaces where the indices will actually belong. See the demo on how to work it out for yourself: http://hemantoracledba.blogspot.com/2008/05/temporary-segments-in-dataindex.html
    Also find Randolf's blog for some other interesting factoids: http://oracle-randolf.blogspot.com/2011/02/parallel-dml-conventional-non-direct.html

  • How to use Exchange partition

    Hi All,
    I have a requirement like .. i have to insert the data from partition table to unpartition table like temp table. by googling i came to know about Exchange partition. by using Exchange partition we can dump temp table to partition table but i don't know how to copy the data from partition table to temp table. following script am using.
    ALTER TABLE abc_partition
    EXCHANGE PARTITION P_2011_1115 WITH TABLE abc_tmp
    INCLUDING INDEXES
    WITHOUT VALIDATION;
    And again i have created a partition table and i ran below query
    ALTER TABLE abc_tmp
    EXCHANGE PARTITION P_2011_1115 WITH TABLE abc_partition
    INCLUDING INDEXES
    WITHOUT VALIDATION;
    but i was getting an error like partition ALTER TABLE EXCHANGE requires a non-partitioned, non-clustered table
    Thanks
    Sree
    Edited by: 874823 on Apr 30, 2012 2:01 AM

    In that case, you need to follow these basic steps.
    1. Use a CTAS (Create Table as Select) to create the staging table. This table's structure needs to match that of the partition table - be that a hash or index organised structure. The columns need to be in the same order, and of the same data type. Not null constraints need to be applied to the applicable columns. If you have manually set storage clauses (e.g. PCTFREE for example) for the partition table, the same needs to be applied to the staging table.
    A CTAS would look something as follows:
    create table staging_table(
      col1 not null,
      col2 null,
      col3 null
    ) nologging as
    select
      some_col,
      some_other_column,
      third_column
    from some_other_data2. The next step is to add the required indexes to the staging table - as that table needs to match the structure of the partitioned table. So the staging table needs to have the same index structures as local partition indexes of the partition table.
    3. The actual partition exchange can now happen. The data is not actually exchanged. Ownership of the data changes. The data blocks (for data and indexes) owned by the staging table, is now owned by that partition in the partition table. Likewise the staging table now owns the data and indexes of the partition.
    4. The last step is cleaning up - dropping and purging the staging table (assuming that you no longer have a need for it).
    The above steps can be fully automated (for any partition table) by developing a generic PL/SQL interface library that performs these steps. Additional features such as parallel processing and tablespaces to use for the staging table and indexes can also considered for such a PL/SQL interface.

  • PRIMARY KEY PARTITIONED INDEXES 생성방법 (ORA-2429, ORA-1408)

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-13
    PRIMARY KEY PARTITIONED INDEXES 생성방법 (ORA-2429, ORA-1408)
    ============================================================
    PURPOSE
    primary key partitioned indexes 를 생성하는 방법을 알아 봅니다.
    SCOPE
    Oracle Partitioning Option은 8~10g Standard Edition에서는 지원하지
    않는다.
    Example:
    SQL> -- 먼저 partitioned table TEST_A 를 생성합니다.
    SQL>
    SQL> CREATE TABLE test_a (col1 number, col2 number, col3 varchar2(20))
    2 PARTITION BY RANGE (col1, col2)
    3 (partition part_test_a_1 values less than (10, 100),
    4 partition part_test_a_2 values less than (20, 200),
    5 partition part_test_a_3 values less than (30, 300),
    6 partition part_test_a_4 values less than (40, 400));
    Table created.
    SQL> -- partitioned table TEST_B 를 생성합니다.
    SQL>
    SQL> CREATE TABLE test_b (col1 number, col2 number, col3 varchar2(20))
    2 PARTITION BY RANGE (col1, col2)
    3 (partition part_test_b_1 values less than (10, 100),
    4 partition part_test_b_2 values less than (20, 200),
    5 partition part_test_b_3 values less than (30, 300),
    6 partition part_test_b_4 values less than (40, 400));
    Table created.
    SQL> -- TEST_A 테이블에
    SQL> -- non-unique local partitioned index, IX_TEST_A 를 생성합니다.
    SQL>
    SQL> CREATE INDEX ix_test_a ON test_a(col1, col2)
    2 LOCAL
    3 (partition ix_test_a_1,
    4 partition ix_test_a_2,
    5 partition ix_test_a_3,
    6 partition ix_test_a_4);
    Index created.
    SQL> -- TEST_B 테이블에
    SQL> -- unique global partitioned index, IX_TEST_B 를 생성합니다.
    SQL>
    SQL> CREATE UNIQUE INDEX ix_test_b1 ON test_b(col1, col2)
    2 GLOBAL PARTITION BY RANGE (col1, col2)
    3 (partition ix_test_b1_1 values less than (20, 200),
    4 partition ix_test_b1_2 values less than (maxvalue, maxvalue));
    Index created.
    SQL> -- TEST_A 테이블에 rimary key constraint (PK_TEST_A) 를 추가 합니다.
    SQL>
    SQL> ALTER TABLE test_a ADD CONSTRAINT pk_test_a
    2 PRIMARY KEY (col2, col1);
    Table altered.
    SQL> -- index IX_TEST_A 를 drop 하려고 하면 다음 에러가 발생합니다.
    SQL>
    SQL> DROP INDEX ix_test_a;
    drop index ix_test_a
    ERROR at line 1:
    ORA-02429: cannot drop index used for enforcement of unique/primary key
    SQL> -- TEST_B 테이블에 partition IX_TEST_B1 에서 사용된 같은 columns 들을 사용해서
    SQL> -- 새로운 두번째 index (IX_TEST_B2) 를 생성하려고 하면
    SQL> -- 다음 에러가 발생합니다.
    SQL>
    SQL> CREATE INDEX ix_test_b2 ON test_b(col1, col2)
    2 LOCAL;
    create index ix_test_b2 on test_b(col1, col2)
    ERROR at line 1:
    ORA-01408: such column list already indexed
    SQL> -- TEST_B 테이블에 primary key constraint (PK_TEST_B) 를 추가 합니다.
    SQL>
    SQL> ALTER TABLE test_b ADD CONSTRAINT pk_test_b
    2 PRIMARY KEY (col1, col2);
    Table altered.
    SQL> -- index IX_TEST_B1 를 drop 하려고 하면 다음 에러가 발생합니다.
    SQL>
    SQL> DROP INDEX ix_test_b1;
    drop index ix_test_b1
    ERROR at line 1:
    ORA-02429: cannot drop index used for enforcement of unique/primary key
    SQL> -- indexes 들과 각 indexes 이 걸려있는 tables 의 목록입니다.
    SQL>
    SQL> SELECT index_name, partition_name, status
    2 FROM user_ind_partitions
    3 ORDER BY index_name, partition_name;
    INDEX_NAME PARTITION_NAME STATUS
    IX_TEST_A IX_TEST_A_1 USABLE
    IX_TEST_A IX_TEST_A_2 USABLE
    IX_TEST_A IX_TEST_A_3 USABLE
    IX_TEST_A IX_TEST_A_4 USABLE
    IX_TEST_B1 IX_TEST_B1_1 USABLE
    IX_TEST_B1 IX_TEST_B1_2 USABLE
    6 rows selected.
    SQL> -- TEST_A 테이블에서 primary key constraint 를 drop 합니다.
    SQL>
    SQL> ALTER TABLE test_a DROP CONSTRAINT pk_test_a;
    Table altered.
    SQL> -- TEST_B 테이블에서 primary key constraint 를 drop 합니다.
    SQL>
    SQL> ALTER TABLE test_b DROP CONSTRAINT pk_test_b;
    Table altered.
    SQL> -- indexes 들과 각 indexes 이 걸려있는 tables 의 목록을 다시 봅니다.
    SQL> -- 여기서 주의해서 보아야 할 것은 non-unique local partitioned index (IX_TEST_A)
    SQL> -- 은 drop 되지 않고 USABLE 상태로 남아 있다는 것입니다.
    SQL> -- 이렇게 되는 이유는 index (IX_TEST_A) 가 non-unique 이기 때문입니다.
    SQL> -- 반면 unique global partitioned index (IX_TEST_B) 은 drop 되었습니다.
    SQL>
    SQL> SELECT index_name, partition_name, status
    2 FROM user_ind_partitions
    3 ORDER BY index_name, partition_name;
    INDEX_NAME PARTITION_NAME STATUS
    IX_TEST_A IX_TEST_A_1 USABLE
    IX_TEST_A IX_TEST_A_2 USABLE
    IX_TEST_A IX_TEST_A_3 USABLE
    IX_TEST_A IX_TEST_A_4 USABLE
    만일 index 가 primary key 에 정의되어 있는 columns 들과 같은 columns
    을 사용해서 만들어 졌다면 primary key 는 그 underlying index 를 사용합니다.
    이것은 index 가 unique 이건 non-unique 이건 또는 global 이건 local partioned index
    이건 관계없이 적용됩니다.
    위의 예제에서 primary key 가 non-unique index 위에 생성되었다는 것을
    주의해 보시기 바랍니다. 이렇게 되는 이유는 index 안의 값들이 사실
    모두 unique 하기 때문입니다. 그렇지 않을 경우 다음 에러가 발생하게 됩니다.
    "ORA-02437: cannot enable (STEELY.PK_TEST_B) - primary key violated."
    2개의 indexes 가 같은 순서의 같은 columns 을 사용해서 만들어 질 수는 없습니다.
    위의 예제에서 TEST_B 테이블에 두번째 index (IX_TEST_B2) 를 만들려고
    했을때 다음에러가 발생하는것을 확인할 수 있었습니다.
    "ORA-01408: such column list already indexed."
    하지만 columns 들의 순서를 바꾼다면 같은 columns 들을 사용하더라도
    추가적으로 indexes 를 생성할 수 있습니다.
    index (IX_TEST_A) 와 primary key (PK_TEST_A) 에 정의된 column 순서는
    반대로 되어 있습니다. 그러나 primary key 는 IX_TEST_A 를 underlying index
    로 사용하고 있습니다.
    테이블에서 primary key constraint 가 drop 되었을때
    만일 index 가 UNIQUE index 로 생성되었다면 대응하는 index 또한 drop 됩니다.
    이 현상은 LOCAL 또는 GLOBAL partitioned indexes 모두에 적용됩니다.
    partitioning 을 최대한 활용하기 위해서는 partitioned tables/indexes
    를 생성할 때에 STORAGE clause 를 반드시 사용해야 합니다.
    Reference Documents
    <Note:74224.1>

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

  • Question about the partition index

    Hi, all, I have some questions about partitioned index.
    And I get from oracle documents that oracle's partition index can be clarified as local partition index and global partition index.
    And local partition index can be clarified as prefix local partition index and non-prefix local partition index. And I also the word "global prefix partition index".
    But, I can not get what the exact meaning after I consulted many documents and notes from website.
    Can anyone give me one example to cover these topic?
    You help is very thankful!
    Thanks and best regards!

    Hi,
    Local index search by partition.
    Local Indexes: A local index is an index on a partitioned table which is partitioned in the exact same manner as the underlying partitioned table. Each partition of a local index corresponds to one and only one partition of the underlying table.
    Global Partitioned Indexes: A global partitioned index is an index on a partitioned or non-partitioned table which is partitioned using a different partitioning-key from the table. Global-partitioned indexes can only be partitioned using range partitioning. For example, a table could be range-partitioned by month and have twelve partitions, while an index on that table could be range-partitioned using a different partitioning key and have a different number of partitions.
    Global Non-Partitioned Indexes: A global non-partitioned index is essentially identical to an index on a non-partitioned table. The index structure is not partitioned.
    Maybe this links help you:
    http://www.oracle.com/technology/products/oracle9i/datasheets/partitioning.html
    http://asktom.oracle.com/pls/ask/f?p=4950:8:12026637104196321871::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:678824574412
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1612281449571
    Cheers

  • HOW TO CREATE LOCAL INDEX ON BIG PARTITION TABLE

    Dear All,
    I have one big table 450GB stored on 9 partitions and same partitions I have created for the index. Now the problem is when i am trying to create local index it took one and half day and is still going on...
    is there any shortest way to create local index on this table easily.
    Database version is 11.2.0.1.0
    INDEX SCRIPT IS
    CREATE INDEX INDEX_SPACE0_IX_LOCAL ON FINANCE (END_TIME)
    INITRANS 2 MAXTRANS
    255
    LOCAL ( PARTITION INDEX_SPACE01
    LOGGING
    NOCOMPRESS
    TABLESPACE INDEX_SPACE01
    PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
    2147483645 BUFFER_POOL
    DEFAULT), PARTITION INDEX_SPACE02
    LOGGING
    NOCOMPRESS
    TABLESPACE INDEX_SPACE02 PCTFREE
    5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
    2147483645 BUFFER_POOL DEFAULT),
    PARTITION INDEX_SPACE03
    LOGGING
    NOCOMPRESS
    TABLESPACE
    INDEX_SPACE03
    PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
    2147483645 BUFFER_POOL DEFAULT),
    PARTITION INDEX_SPACE04
    LOGGING
    NOCOMPRESS
    TABLESPACE
    INDEX_SPACE04 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
    1 MAXEXTENTS
    2147483645 BUFFER_POOL DEFAULT),
    PARTITION INDEX_SPACE05
    LOGGING
    NOCOMPRESS
    TABLESPACE
    INDEX_SPACE05 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
    1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT),
    PARTITION INDEX_SPACE06
    LOGGING
    NOCOMPRESS
    TABLESPACE INDEX_SPACE06 PCTFREE 5 INITRANS 2
    MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL
    DEFAULT),
    PARTITION INDEX_SPACE07
    LOGGING
    NOCOMPRESS
    TABLESPACE INDEX_SPACE07 PCTFREE
    5 INITRANS 2
    MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL
    DEFAULT),
    PARTITION INDEX_SPACE08
    LOGGING
    NOCOMPRESS
    TABLESPACE INDEX_SPACE08 PCTFREE
    5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
    2147483645
    BUFFER_POOL DEFAULT),
    PARTITION INDEX_SPACE09
    LOGGING
    NOCOMPRESS
    TABLESPACE
    INDEX_SPACE09 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
    1 MAXEXTENTS 2147483645 BUFFER_POOL
    DEFAULT))
    NOPARALLEL;
    Thanks in advance......
    Thanks,
    Edited by: sherkhan on Aug 24, 2011 3:36 AM
    Edited by: sherkhan on Aug 24, 2011 3:49 AM

    Have you verified that 'n' Index partition segments have got created so far ? (they would apepar as TEMPORARY segments only till the full index creation is completed). Have you monitored the session statistics and waits and confirmed that it is not waiting on something horrible ?
    A CREATE INDEX can well be NOLOGGING instead of LOGGING. It could also use PARALLEL but I always recommend setting it back to NOPARALLEL immediately after the CREATE is completed.
    You can also "quickly" build an empty index and then gradually create (i.e. build) each partition
    CREATE INDEX INDEX_SPACE0_IX_LOCAL  .........  UNUSABLE ;
    ALTER INDEX INDEX_SPACE0_IX_LOCAL REBUILD PARTITION PARTITION INDEX_SPACE01;
    ALTER INDEX INDEX_SPACE0_IX_LOCAL REBUILD PARTITION PARTITION INDEX_SPACE02;
    ...Hemant K Chitale

Maybe you are looking for

  • Email-only account greyed out

    An email-only account appears greyed-out in the LHS column in the Mail window. Hovering the cursor over the mailbox name produces a two-line pop-up error message as follows. Mail was unable to open this mailbox on the server "mail.mac.com". The serve

  • WRX Error-For consumables posting with Acc Assignment K

    We are doing a GR for consumables posting with account assignment category K (Cost centre).  However, while trying to post the document, system issues a message that "Account determination for WRX cannot be determined".  Why this error is coming for

  • STANDARD VGA GRAPHIC ADAPTER

    i have a hp110-025il desktop its standard vga graphic adapter is outdated but it says that it is up to date.so many games dont work.please help This question was solved. View Solution.

  • LIMIT on oracle ?

    Hi , I have a problem with a limitation on a large result set here is my statement select           C_CARDBASE.PID     C1_PID,      AL_L_RIGHT.RIGHT_NAME     C2_MAININSCL_DESC,      AL_L_INSCL.INSCL_NAME     C3_SUBINSCL_DESC,      V_HMAIN.HNAME     C

  • Share aperture library with another aperture user

    How do I share the same aperture library with another aperture user on a different computer each using separate aperture software? We have have tried using a hard drive, but the vault is not showing up to download.