creating indexes on partitioned tables...

Hi all
I use 11g. creates a table with partition on transaction_dt. Now I have to create index based on the combination of the column below.
can anyone suggest the best method to create the partioned indexes based on the underside of the columns?

enjoyed the great suggestions...
CREATE INDEX TB_PRCHS_SALE_TRANS_BASE_IDX1 ON TB_PRCHS_SALE_TRANS_BASE
(TRANSACTION_DT, VENDOR_ACCT_NBR, VENDOR_SECURITY_NBR);


CREATE INDEX TB_PRCHS_SALE_TRANS_BASE_IDX2 ON TB_PRCHS_SALE_TRANS_BASE
(TRANSACTION_DT, ING_ACCT_NBR, ING_SECURITY_NBR);


CREATE INDEX TB_PRCHS_SALE_TRANS_BASE_IDX3 ON TB_PRCHS_SALE_TRANS_BASE
(TRADE_DT, SETTLEMENT_DT, VENDOR_ACCT_NBR, VENDOR_SECURITY_NBR);


CREATE UNIQUE INDEX TB_PRCHS_SALE_TRANS_BASE_PK ON TB_PRCHS_SALE_TRANS_BASE
(TRANS_CONTROL_ID);


CREATE INDEX TB_PRCHS_SALE_TRANS_INDX3 ON TB_PRCHS_SALE_TRANS_BASE
(OLD_TRANSACTION_ID);


ALTER TABLE TB_PRCHS_SALE_TRANS_BASE ADD (
  CONSTRAINT TB_PRCHS_SALE_TRANS_BASE_PK
 PRIMARY KEY
 (TRANS_CONTROL_ID));


Table
====================

CREATE TABLE TB_PRCHS_SALE_TRANS_BASE
(
  TRANSACTION_DT              DATE              NOT NULL,
  TRANS_CONTROL_ID            NUMBER            NOT NULL,
  VENDOR_CD                   CHAR(3 BYTE)      NOT NULL,
  ING_ACCT_NBR                NUMBER(10)        NOT NULL,
  ING_ACCT_TYPE_CD            CHAR(1 BYTE)      NOT NULL,
  ING_SECURITY_NBR            NUMBER(10)        NOT NULL,
  VENDOR_ACCT_NBR             VARCHAR2(10 BYTE) NOT NULL,
  VENDOR_ACCT_TYPE_CD         CHAR(1 BYTE)      NOT NULL,
  VENDOR_ACCT_CHCK_CD         CHAR(1 BYTE)      NOT NULL,
  VENDOR_SECURITY_NBR         VARCHAR2(10 BYTE),
  BUY_SELL_CD                 CHAR(1 BYTE)      NOT NULL,
  TRADE_DT                    DATE,
  SETTLEMENT_DT               DATE,
  CREATE_USER                 VARCHAR2(50 BYTE),
  UPDATE_TS                   DATE,
  UPDATE_USER                 VARCHAR2(50 BYTE),
  OLD_TRANSACTION_ID          NUMBER(10)
partition by range (TRANSACTION_DT)
interval (numtoyminterval(1,'YEAR'))
(
   partition p001 values less than (date '2002-01-01'),
   partition p002 values less than (date '2003-01-01'),
   partition p003 values less than (date '2004-01-01'),
   partition p004 values less than (date '2005-01-01'),
   partition p005 values less than (date '2006-01-01'),
   partition p006 values less than (date '2007-01-01'),
   partition p007 values less than (date '2008-01-01'),
   partition p008 values less than (date '2009-01-01'),
   partition p009 values less than (date '2010-01-01'),
   partition p010 values less than (date '2011-01-01'),
  );
 
CREATE INDEX TB_PRCHS_SALE_TRANS_INDX3 ON TB_PRCHS_SALE_TRANS_BASE
(OLD_TRANSACTION_ID)
LOCAL
(
partition p001,
partition p002,
partition p003,
partition p004,
partition p005,
partition p006,
partition p007,
partition p008,
partition p009,
partition p010
)
/
-- Since PK column set does not include partitioning colums
-- you can't create LOCAL partitioned index.
ALTER TABLE TB_PRCHS_SALE_TRANS_BASE ADD
 CONSTRAINT TB_PRCHS_SALE_TRANS_BASE_PK
PRIMARY KEY
(TRANS_CONTROL_ID)
USING INDEX
GLOBAL
(
partition p001,
partition p002,
partition p003,
partition p004,
partition p005,
partition p006,
partition p007,
partition p008,
partition p009,
partition p010
)
/

SY.

Tags: Database

Similar Questions

  • Creating indexes for the table

    can someone help me how to create indexes in the table. I m creating own table... I need to select a particular field in the table. So I need to calculate the index position. I use my code like this,

    This will returnthe number of columns in the table.

    Class array

    {

    private int Table_Index()
    {
    for (int x = 0; x)<>
    {
    table_index = x;
    }
    Return table_index;
    }

    }

    MainClass can I get this length of Index

    Table T1;

    int t1 is T1. Table_Index();

    This property returns my length (4) of table column

    Using this index (t1) I HAV to see what position I'm at table now...

    someone help me...

    You can use a listfield, he supports methods to get the selected row and its contents.

  • Why I can't create indexes on the table of RDF data

    When I tried to create indexes on the table of RDF data, it always say the table or view does not exist. I created the RDF model using java codes:

    Oracle Oracle = new Oracle ("jdbc:oracle:thin:@localhost:1521:orcl", "system", "123");

    Chart GraphOracleSem = new GraphOracleSem (oracle, "test2");


    And used the following commands in sqlplus to create indexes:

    SQL >

    SELECT THE SEPARATE OWNER, OBJECT_NAME

    FROM DBA_OBJECTS

    WHERE TYPE_OBJET = 'TABLE '.

    4. AND OBJECT_NAME like ' % TEST2;

    OWNER

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

    OBJECT_NAME

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

    SYSTEM

    TEST2_NS

    SYSTEM

    RDFB_TEST2

    SYSTEM

    TEST2_TPL

    OWNER

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

    OBJECT_NAME

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

    SYSTEM

    RDFC_TEST2


    SQL > connect as sysdba

    Enter the password:

    Connected.

    SQL >

    SQL >

    SQL > select * from TEST2_TPL;

    Select * from TEST2_TPL

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    SQL > CREATE INDEX test2_sub_idx ON TEST2_TPL (triple. GET_SUBJECT());

    CREATE INDEX test2_sub_idx ON TEST2_TPL (triple. GET_SUBJECT())

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    Hi Shifu,

    It is not recommended to use the SYS or SYSTEM to store/manage schema graph RDF data.

    Can you please try the following in a SQL * more terminal?

    SQL > conn system/eu1

    Connected.

    SQL >

    SQL >

    SQL > create user graphuser identified by graphuser;

    Created by the user.

    SQL > grant connect, resources, unlimited tablespace to graphuser;

    Grant succeeded.

    SQL > conn graphuser/graphuser

    Connected.

    SQL > create table graph_tpl (triple sdo_rdf_triple_s) compress;

    Table created.

    SQL > sem_apis.create_sem_model exec ('graphic', 'graph_tpl', 'three');

    PL/SQL procedure successfully completed.

    SQL > insert into graph_tpl values (sdo_rdf_triple_s ('graph', '', '', ''));

    1 line of creation.

    SQL > select count (1) in the mdsys.rdfm_graph;

    1

    You see the same result?

    Thank you

    Zhe Wu

  • Creating Index on another table in schema stored in my table

    Hello
    I want to create indexes on a table column that is in another schema of my schema and index will be stored in my diagram.

    ex: the current user 'hr '.
    SQL > create index idx1 on scott.emp (eno);

    Does the above query?

    Thank you
    Sri
    SQL> conn
    Enter user-name: hr@****
    Enter password:
    Connected.
    SQL> create index ndx on scott.emp(sal);
    
    Index created.
    
    SQL> show user
    USER is "HR"
    
    SQL> select index_name from user_indexes where index_name = 'NDX';
    
    INDEX_NAME
    ------------------------------
    NDX
    
  • Partitioned global index on partitioned table range, but the index partition does not work

    Hello:

    I was creating an index partitioned on table partitioned and partitioned index does not work.

    create table table_range)

    CUST_FIRST_NAME VARCHAR2 (20).

    CUST_GENDER CHAR (1),

    CUST_CITY VARCHAR2 (30),

    COUNTRY_ISO_CODE CHAR (2),

    COUNTRY_NAME VARCHAR2 (40),

    COUNTRY_SUBREGION VARCHAR2 (30),

    PROD_ID NUMBER NOT NULL,

    CUST_ID NUMBER NOT NULL,

    TIME_ID DATE NOT NULL,

    CHANNEL_ID NUMBER NOT NULL,

    PROMO_ID NUMBER OF NON-NULL,

    QUANTITY_SOLD NUMBER (10.2) NOT NULL,

    AMOUNT_SOLD NUMBER (10.2) NOT NULL

    )

    partition by (range (time_id)

    lower partition p1 values (u01 tablespace to_date('2001/01/01','YYYY/MM/DD')),

    lower partition (to_date('2002/01/01','YYYY/MM/DD')) tablespace u02 p2 values

    );

    create index ind_table_range on table2 (prod_id)

    () global partition range (prod_id)

    values less than (100) partition p1,

    lower partition p2 values (maxvalue)

    );

    SQL > select TABLE_NAME, SUBPARTITION_COUNT, HIGH_VALUE, nom_partition NUM_ROWS of user_tab_partitions;

    TABLE_NAME NOM_PARTITION SUBPARTITION_COUNT HIGH_VALUE NUM_ROWS

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

    TABLE_RANGE P2 0 TO_DATE (' 2002-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 259418)

    TABLE_RANGE P1 0 TO_DATE (' 2001-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 659425)

    SQL > select INDEX_NAME, NUM_ROWS nom_partition, HIGH_VALUE user_ind_partitions;

    INDEX_NAME NOM_PARTITION HIGH_VALUE NUM_ROWS

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

    P1 IND_TABLE_RANGE 100 479520

    IND_TABLE_RANGE P2 MAXVALUE 439323

    SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE');

    SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE', GRANULARITY = > 'PARTITION');

    SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE');

    SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE', GRANULARITY = > 'PARTITION');

    SQL > set autotrace traceonly

    SQL > alter shared_pool RAS system;

    SQL > changes the system built-in buffer_cache;

    SQL > select * from table_range

    where prod_id = 127;

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

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

    |   0 | SELECT STATEMENT |             | 16469 |  1334K |  3579 (1) | 00:00:43 |       |       |

    |   1.  RANGE OF PARTITION ALL THE |             | 16469 |  1334K |  3579 (1) | 00:00:43 |     1.     2.

    |*  2 |   TABLE ACCESS FULL | TABLE_RANGE | 16469 |  1334K |  3579 (1) | 00:00:43 |     1.     2.

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

    Information of predicates (identified by the operation identity card):

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

    2 - filter ("PROD_ID" = 127)

    Statistics

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

    320 recursive calls

    2 db block Gets

    13352 consistent gets

    11820 physical reads

    0 redo size

    855198 bytes sent via SQL * Net to client

    12135 bytes received via SQL * Net from client

    1067 SQL * Net back and forth to and from the client

    61 sorts (memory)

    0 sorts (disk)

    15984 rows processed

    Once the sentence you say ' does not ' and then you go to paste plans that seem to show that it "works".

    What gives?

    In fact, if you look at the plans - think Oracle you have 16 k rows in the table and he'll be back k 12 rows for your select statement. In this case, Oracle is picking up the right plan - full scan 16 ranks of k is a lot less work to digitize the index lines k 12 followed by the research of rank k 12 rowid.

  • CTXCAT index on partitioned tables

    Hi all

    I use an oracle 11.2 database and try to use the index for a sample application oracle CTXCAT.

    I saw that oracle reference documentation "the CTXCAT index can't stand table and index partitioning, not...» "in http://docs.oracle.com/cd/B28359_01/text.111/b28303/ind.htm#BEIIEAFD

    But I was able to create a CTXCAT index on a partitioned table query to use it successfully.

    So can someone tell me exactly it meaning in the documentation of oracle developer "CTXCAT index does not support index and table partitioning?

    Thanks in advance,

    Mor.

    This simply means that you cannot create a LOCAL partitioned index on a table partitioned using the CTXCAT indextype. There is not probably the creation of a global index (ie. covering all partitions) on a partitioned table.

    The wording could be clearer.

  • How to create indexes on the ordered collection of XMLTYPE table?

    I use Oracle 11.2.0.2.

    Basically, my XML documents have a 3-level hierarchy:

    event

    + - action [1: n]

    + - param [1: n]

    I try to create indexes on the tables of the orderly collection, but cannot get the right syntax...

    I created a table with an XMLType object-relational column:

    CREATE TABLE T_C_RMP_MNTRNG_XML_FULL_IL4 (
      MESSAGE_ID NUMBER(22,0) NOT NULL ENABLE,
      XML_EVAL_ID NUMBER(22,0),
      VIN7 VARCHAR2(7 BYTE),
      FLEET_ID VARCHAR2(50 BYTE),
      CSC_SW_VERSION VARCHAR2(100 BYTE),
      RECEIVED DATE,
      XML_CONTENT SYS.XMLTYPE ,
      DWH_LM_TS_UTC DATE NOT NULL ENABLE,
      CONSTRAINT PK_C_RMP_MNTRNG_XML_FULL_IL4 PRIMARY KEY (MESSAGE_ID)
    ) NOLOGGING TABLESPACE CATALOG
    VARRAY "XML_CONTENT"."XMLDATA"."action" STORE AS TABLE "T_OR_MON_ACTION" (
      NOLOGGING TABLESPACE "CATALOG"
      VARRAY "param" STORE AS TABLE "T_OR_MON_ACTION_PARAM" (
      NOLOGGING TABLESPACE "CATALOG"
      ) RETURN AS LOCATOR
    ) RETURN AS LOCATOR
    XMLTYPE XML_CONTENT STORE AS OBJECT RELATIONAL XMLSCHEMA "http://mydomain.com/cs.xsd" ELEMENT "monitoring";
    
    
    
    
    

    I execute the SELECT statement:

    SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, UNIXTS_TO_DATE(ACTION_TIMESTAMP) ACTION_TIMESTAMP
    FROM T_C_RMP_MNTRNG_XML_FULL_IL4, 
    XMLTABLE( 
      'for $i1 in /monitoring , 
      $i2 in $i1/action            
      return element r {              
      $i1/eventId,              
      $i2            
      }' 
      PASSING XML_CONTENT COLUMNS 
      EVENT_ID VARCHAR(40) PATH 'eventId', 
      ACTION_SUB_ID INTEGER PATH 'action/actionSubId', 
      ACTION_TYPE VARCHAR2(100) PATH 'action/type', 
      ACTION_TIMESTAMP NUMBER(13,0) PATH 'action/time' 
    ) T2 
    WHERE ( 
      EVENT_ID IS NOT NULL AND ACTION_SUB_ID IS NOT NULL 
    )
    
    
    
    
    

    The plan of the explain command looks like this (sorry, don't know how to get it formatted any 'eye-team'):

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

    | ID | Operation | Name                        | Lines | Bytes | TempSpc | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |                             |  1609K |  6316M |       |  6110K (1) | 20:22:11 |

    |*  1 |  HASH JOIN |                             |  1609K |  6316M |   111 M |  6110K (1) | 20:22:11 |

    |   2.   TABLE ACCESS FULL | T_C_RMP_MNTRNG_XML_FULL_IL4 |   582K |   104 M |       |  5241 (1) | 00:01:03 |

    |*  3 |   TABLE ACCESS FULL | T_OR_MON_ACTION |    32 M |   117G |       |   105K (2) | 00:21:08 |

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

    Information of predicates (identified by the operation identity card):

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

    1 - access ("NESTED_TABLE_ID"= "T_C_RMP_MNTRNG_XML_FULL_IL4"." ("SYS_NC0001300014$")

    filter (CAST (SYS_XQ_UPKXML2SQL (SYS_XQEXVAL (SYS_XQEXTRACT ((SYS_XMLGEN ("T_C_RMP_MNTRN XMLCONCAT

    G_XML_FULL_IL4 ". "" $ SYS_NC00017 ", NULL, SYS_XMLCONV ("T_C_RMP_MNTRNG_XML_FULL_IL4". "SYS_NC00012$", 0.32,

    (('EC1EEF23FD023A27E04032A06D930A8D', 3, 3783, 1)), SYS_MAKEXML ('EC1EEF23FD023A27E04032A06D930A8D', 3780,

    'T_C_RMP_MNTRNG_XML_FULL_IL4 '. "' SYS_NC00008$ ', 'SYS_ALIAS_0 '. ((("' SYS_NC_ROWINFO$ ')),'/ ID ', NULL), 0,.

    0,20971520,0), 50.1, 2) AS VARCHAR (40)) IS NOT NULL)

    3 filter (CAST (TO_NUMBER (TO_CHAR ("SYS_ALIAS_0". "actionSubId")) AS INTEGER) IS NOT NULL) "

    Note

    -----

    -dynamic sample used for this survey (level = 2)

    -Construction detected no optimized XML (activate XMLOptimizationCheck for more information)

    The XML schema looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:storeVarrayAsTable="true" oraxdb:flags="2105639" oraxdb:schemaURL="http://mydomain.com/cs.xsd" oraxdb:schemaOwner="MYUSER" oraxdb:numProps="23">
      <xs:element name="monitoring" oraxdb:propNumber="3785" oraxdb:global="true" oraxdb:SQLName="monitoring" oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="monitoring757_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element maxOccurs="unbounded" ref="action" oraxdb:propNumber="3780" oraxdb:global="false" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="action756_COLL" oraxdb:SQLCollSchema="MYUSER"/>
            <xs:element ref="reservationType" oraxdb:propNumber="3781" oraxdb:global="false" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="softwareVersion" oraxdb:propNumber="3782" oraxdb:global="false" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="eventId" oraxdb:propNumber="3783" oraxdb:global="false" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="vin" oraxdb:propNumber="3784" oraxdb:global="false" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="action" oraxdb:propNumber="3790" oraxdb:global="true" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="action754_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element ref="type" oraxdb:propNumber="3786" oraxdb:global="false" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element maxOccurs="unbounded" ref="param" oraxdb:propNumber="3787" oraxdb:global="false" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="param753_COLL" oraxdb:SQLCollSchema="MYUSER"/>
            <xs:element ref="actionSubId" oraxdb:propNumber="3788" oraxdb:global="false" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="time" oraxdb:propNumber="3789" oraxdb:global="false" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="type" type="xs:string" oraxdb:propNumber="3791" oraxdb:global="true" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="type751_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="param" oraxdb:propNumber="3794" oraxdb:global="true" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="param750_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element minOccurs="0" ref="value" oraxdb:propNumber="3792" oraxdb:global="false" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="key" oraxdb:propNumber="3793" oraxdb:global="false" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="value" type="xs:string" oraxdb:propNumber="3795" oraxdb:global="true" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="value748_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="key" type="xs:string" oraxdb:propNumber="3796" oraxdb:global="true" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="key747_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="actionSubId" type="xs:integer" oraxdb:propNumber="3797" oraxdb:global="true" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="actionSubId746_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="time" type="xs:integer" oraxdb:propNumber="3798" oraxdb:global="true" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="time745_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="reservationType" type="xs:string" oraxdb:propNumber="3799" oraxdb:global="true" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="reservationType744_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="softwareVersion" type="xs:string" oraxdb:propNumber="3800" oraxdb:global="true" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="softwareVersion743_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="eventId" type="xs:string" oraxdb:propNumber="3801" oraxdb:global="true" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="eventId742_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="vin" type="xs:string" oraxdb:propNumber="3802" oraxdb:global="true" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="vin741_TAB" oraxdb:defaultTableSchema="MYUSER"/>
    </xs:schema>
    
    
    
    
    

    How can I create an index on these tables of the ordered collection to improve performance?

    I found the example at http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb_rewrite.htm#ADXDB5859 but am not able to apply to this particular case...

    Thank you in advance...

    If the schema is not annotated and XS: Integer and XS: String are mapped to types of data NUMBER and VARCHAR2 (4000), so you must use in your query to avoid typecasting unnecessary operations.

    You must also use XMLTABLEs chained when accessing a parent/child instead of a FLWOR expression relationship, otherwise the CBO cannot rewrite the XQuery query correctly (maybe it's fixed in the latest version).

    If you make these changes, the plan should show the cleaner predicates:

    SQL > SELECT EVENT_ID, MESSAGE_ID, ACTION_TYPE, ACTION_SUB_ID, ACTION_TIMESTAMP

    2 FROM test_table

    3 XMLTABLE ('/ monitoring ')

    4 COLUMNS XML_CONTENT OF PASSAGE

    5 WAY of VARCHAR2 (4000) EVENT_ID "ID."

    6 actions for XMLTYPE PATH 'action '.

    (7) T1,

    8 XMLTABLE ('/ action')

    Shares of PASSAGE 9 COLUMNS

    NUMBER of ACTION_SUB_ID 10 PATH "actionSubId."

    11 PATH of VARCHAR2 (4000) ACTION_TYPE "type."

    12 WAY of NUMBER ACTION_TIMESTAMP 'time '.

    (13) T2

    14 WHERE EVENT_ID IS NOT NULL

    15 AND ACTION_SUB_ID IS NOT NULL

    16;

    Execution plan

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

    Hash value of plan: 1763884463

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |                 |   109.   220K |     6 (17). 00:00:01 |

    |   1.  THE MERGE JOIN.                 |   109.   220K |     6 (17). 00:00:01 |

    |*  2 |   TABLE ACCESS BY INDEX ROWID | TEST_TABLE |    11.   352.     2 (0) | 00:00:01 |

    |   3.    INDEX SCAN FULL | SYS_C007567 |    11.       |     1 (0) | 00:00:01 |

    |*  4 |   JOIN TYPE.                 |   109.   216K |     4 (25) | 00:00:01 |

    |*  5 |    TABLE ACCESS FULL | T_OR_MON_ACTION |   106 S 216K |     3 (0) | 00:00:01 |

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

    Information of predicates (identified by the operation identity card):

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

    2 - filter("TEST_TABLE".") (' SYS_NC00012$ ' IS NOT NULL)

    4 - access("SYS_ALIAS_0".") NESTED_TABLE_ID "=" TABLE_TEST. " ("' SYS_NC0000800009$ ')

    filter ("SYS_ALIAS_0". "NESTED_TABLE_ID"="TABLE_TEST" "." " ("SYS_NC0000800009$")

    5 - filter("SYS_ALIAS_0"." actionSubId» IS NOT NULL)

    Note

    -----

    -dynamic sample used for this survey (level = 2)

    Now, if it is still necessary, everything boils down to choosing a technique for index NULL values:

    -composite index with a column not zero or constant

    -FBI

    -bitmap image

    Choose the one that best fits your data, the selectivity and activity on the tables.

  • Adding a Partition to a range-Hash partitioned Table

    Hello

    I created the composite partition table (RANGE-HASH).  Oracle: 11.2, OS: HP UX

    CREATE TABLE 'XYZ '. "" TABLE_XYZ.

    (

    ----

    VARCHAR2 (54) "PROFILE" DEFAULT "000000000000000000' ENABLE NON-NULL"

    NUMBER (21.7) "CREATED_ON" DEFAULT 0 ENABLE NOT NULL,.

    ----

    )

    PARTITION BY RANGE

    (

    CREATED_ON

    )

    SUBPARTITION BY HASH

    (

    VIEW PROFILE

    )

    SUBPARTITION TEMPLATE

    (

    SUBPARTITION SP1 TABLESPACE PSAPISU,

    SUBPARTITION TABLESPACE PSAPISU SP2,

    SUBPARTITION SP3 TABLESPACE PSAPISU,

    SUBPARTITION SP4 TABLESPACE PSAPISU,

    SUBPARTITION SP5 TABLESPACE PSAPISU,

    SUBPARTITION SP6 TABLESPACE PSAPISU,

    SUBPARTITION SP7 TABLESPACE PSAPISU,

    SUBPARTITION SP8 TABLESPACE PSAPISU,

    SUBPARTITION SP9 TABLESPACE PSAPISU,

    SUBPARTITION SP10 TABLESPACE PSAPISU,

    SUBPARTITION SP11 TABLESPACE PSAPISU,

    SUBPARTITION SP12 TABLESPACE PSAPISU,

    SUBPARTITION SP13 TABLESPACE PSAPISU,

    SUBPARTITION SP14 TABLESPACE PSAPISU,

    SUBPARTITION SP15 TABLESPACE PSAPISU,

    SUBPARTITION SP16 TABLESPACE PSAPISU,

    SUBPARTITION SP17 TABLESPACE PSAPISU,

    SUBPARTITION SP18 TABLESPACE PSAPISU,

    SUBPARTITION SP19 TABLESPACE PSAPISU,

    SUBPARTITION SP20 TABLESPACE PSAPISU,

    SUBPARTITION SP21 TABLESPACE PSAPISU,

    SUBPARTITION SP22 TABLESPACE PSAPISU,

    SUBPARTITION SP23 TABLESPACE PSAPISU,

    SUBPARTITION SP24 TABLESPACE PSAPISU,

    SUBPARTITION SP25 TABLESPACE PSAPISU

    )

    (

    CREATED_ON_OCP01 PARTITION VALUES LESS THAN (20090101000000).

    CREATED_ON_OCP02 PARTITION VALUES LESS THAN (20090401000000).

    CREATED_ON_OCP03 PARTITION VALUES LESS THAN (20090701000000).

    CREATED_ON_OCP04 PARTITION VALUES LESS THAN (20091001000000).

    CREATED_ON_OCP05 PARTITION VALUES LESS THAN (20100101000000).

    CREATED_ON_OCP06 PARTITION VALUES LESS THAN (20100401000000).

    CREATED_ON_OCP07 PARTITION VALUES LESS THAN (20100701000000).

    CREATED_ON_OCP08 PARTITION VALUES LESS THAN (20101001000000).

    CREATED_ON_OCP09 PARTITION VALUES LESS THAN (20110101000000).

    CREATED_ON_OCP10 PARTITION VALUES LESS THAN (20110401000000).

    CREATED_ON_OCP11 PARTITION VALUES LESS THAN (20110701000000).

    CREATED_ON_OCP12 PARTITION VALUES LESS THAN (20111001000000).

    CREATED_ON_OCP13 PARTITION VALUES LESS THAN (20120101000000).

    CREATED_ON_OCP14 PARTITION VALUES LESS THAN (20120401000000).

    CREATED_ON_OCP15 PARTITION VALUES LESS THAN (20120701000000).

    CREATED_ON_OCP16 PARTITION VALUES LESS THAN (20121001000000).

    CREATED_ON_OCP17 PARTITION VALUES LESS THAN (20130101000000).

    CREATED_ON_OCP18 PARTITION VALUES LESS THAN (20130401000000).

    CREATED_ON_OCP19 PARTITION VALUES LESS THAN (20130701000000).

    CREATED_ON_OCP20 PARTITION VALUES LESS THAN (20131001000000).

    CREATED_ON_OCP21 PARTITION VALUES LESS THAN (20140101000000).

    CREATED_ON_OCP22 PARTITION VALUES LESS THAN (20140401000000).

    CREATED_ON_OCP23 PARTITION VALUES LESS THAN (20140701000000).

    CREATED_ON_OCP24 PARTITION VALUES LESS THAN (20141001000000).

    CREATED_ON_OCP25 PARTITION VALUES LESS THAN (20150101000000).

    PARTITION CREATED_ON_OCPMAX VALUES LESS THAN (MAXVALUE)

    )

    TABLESPACE "PSAPISU" ENABLE LINE MOVEMENT;

    Now, I am trying to add the new partition but becomes under errors:

    ALTER TABLE SAPISU. ADD PARTITION VALUES LESS THAN (20150401000000) CREATED_ON_OCP26 ZTMD_300_VERS_MANAGE

    *

    ERROR on line 1:

    ORA-14074: partition bound must gather greater than that of the last partition

    ERROR on line 1:

    ORA-14018: partition bound list contains too few elements

    I tried the SYNTAX mentioned by Oracle DOC, still getting error. Partitioned table and index management

    Could if it you please let me know, what is the exact syntax that I should follow?

    See you soon

    Sameer

    CREATED_ON_OCPMAX PARTITION SPLIT THAN (MAXVALUE)

    That don't mean to 'divide' the MAXVALUE partition.

    You cannot split a partition that contains the values of A, B, C, D, MAXVALUE to MAXVALUE; that makes no sense. ERROR on line 1:

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

    That exception is to say you can't use MAXVALUE upper limit. You must use a value that is actually IN the partition.

    Go back and look at the definition of your partitions:

    CREATED_ON_OCP25 PARTITION VALUES LESS THAN (20150101000000).

    PARTITION CREATED_ON_OCPMAX VALUES LESS THAN (MAXVALUE)

    See which ends with: "VALUES LESS THAN (MAXVALUE)? MAXVALUE is not IN the score; This is the upper limit of the partition.

    Divide certain value > '20150101000000' and LESS THAN MAXVALUE;

    So if you try to create a partition for OCP26 you can use '20160101000000'.

    CREATE TABLE PART_TEST2)
    VARCHAR2 (54) DEFAULT PROFILE "000000000000000000' ENABLE NOT NULL,
    CREATED_ON NUMBER (21.7) DEFAULT 0 ENABLE NOT NULL
    )
    PARTITION BY RANGE (CREATED_ON)
    (
    CREATED_ON_OCP24 PARTITION VALUES LESS THAN (20141001000000).
    CREATED_ON_OCP25 PARTITION VALUES LESS THAN (20150101000000).
    PARTITION CREATED_ON_OCPMAX VALUES LESS THAN (MAXVALUE)
    )

    ALTER table split partition created_on_ocpmax part_test2
    to (20160101000000) into (partition, partition CREATED_ON_OCPMAX created_on_ocp26)

  • Size of partition on interval range partitioned Table happens when SYSDATE is used in a Where Clause

    We have tables interval range partitioned on a DATE, with a partition for each day column - very standard and straight out of doc Oracle.

    A 3rd party application queries the tables to find the number of rows based on the date range that is located on the column used for the partition key.

    This application uses the date range specified from the current date - i.e. for last two days would be «...» StartDate > SYSDATE-2 "- but the partition size is irrelevant and the explain command plan shows that each partition is included."

    In presenting the request uses the date in a variable partition size location and query table is obviously much better.

    DB is 11.2.0.3 on RHEL6, and default settings - i.e. nothing that could influence the behavior of the optimizer to something unusual.

    I can't work on why this would be the case. It is very easy to reproduce with cases of simple test below.

    I would be very interested to hear any views on why it's that way and if anything can be done to allow the size of the partition to work with a query including SYSDATE because it would be difficult to get the application code has changed.

    In addition to make a case to change the code, I need an explanation of why query using SYSDATE is not advisable and I know this information.

    (1) create a simple partitioned table

    CREATETABLE part_test
       (id                      NUMBER NOT NULL,
        starttime               DATE NOT NULL,
        CONSTRAINT pk_part_test PRIMARY KEY (id)) 
    PARTITION BY RANGE (starttime) INTERVAL (NUMTODSINTERVAL(1,'day')) (PARTITION p0 VALUES LESS THAN (TO_DATE('01-01-2013','DD-MM-YYYY')));
    

    (2) fill in the rows of the table 1 million distributed among 10 partitions

    BEGIN
        FOR i IN 1..1000000
        LOOP
            INSERT INTO part_test (id, starttime) VALUES (i, SYSDATE - DBMS_RANDOM.value(low => 1, high => 10));
        END LOOP;
    END;
    /
    EXEC dbms_stats.gather_table_stats('SUPER_CONF','PART_TEST');
    

    (3) to query the Table of data from the last 2 days using SYSDATE in paragraph

    EXPLAIN PLAN FOR 
    SELECT  count(*) 
    FROM    part_test
    WHERE   starttime >= SYSDATE - 2;
    

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

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

    |   0 | SELECT STATEMENT |           |     1.     3 ×  7895 (1) | 00:00:01 |       |       |

    |   1.  GLOBAL TRI |           |     1.     3 ×            |          |       |       |

    |   2.   RANGE OF PARTITION ITERATOR.           |   111K |   867K |  7895 (1) | 00:00:01 |   KEY | 1048575.

    |*  3 |    TABLE ACCESS FULL | PART_TEST |   111K |   867K |  7895 (1) | 00:00:01 |   KEY | 1048575.

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

    Information of predicates (identified by the operation identity card):

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

    3 - filter("STARTTIME">=SYSDATE@!-2)

    (4) now do the same query, but with SYSDATE - 2 presented as a literal value.

    This query returns the same response but very different cost.

    EXPLAIN PLAN FOR
    SELECT count(*) 
    FROM part_test
    WHERE starttime >= (to_date('23122013:0950','DDMMYYYY:HH24MI'))-2;
    

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

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

    |   0 | SELECT STATEMENT |           |     1.     8.   131 (0) | 00:00:01 |       |       |

    |   1.  GLOBAL TRI |           |     1.     8.            |          |       |       |

    |   2.   RANGE OF PARTITION ITERATOR.           |   111K |   867K |   131 (0) | 00:00:01 |   356 . 1048575.

    |*  3 |    TABLE ACCESS FULL | PART_TEST |   111K |   867K |   131 (0) | 00:00:01 |   356 | 1048575.

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

    Information of predicates (identified by the operation identity card):

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

    3 filter ("STARTTIME" > = TO_DATE (' 2013-12-21 09:50 ',' syyyy-mm-dd hh24:mi:ss'))))

    Thank you in anticipation

    Jim

    sysdate is not constant and its value may change from time optimization of execution; but the optimizer can deduce that he will be a known running value and then produce a plan that will make the size of partition running.  This is the meaning of 'KEY' in the column pstart – the partition of departure will be known at run time and the size of partition will take place in order to eliminate the previous partitions.

    Concerning

    Jonathan Lewis

  • Index on I$ Table

    Hi professionals,.

    I have the following indexes on the target table.

    CREATE INDEXES M23123MGR. SALE_IDX ON M23123MGR. DW_SALES_DIM
    (NVL("PKG_SALE_CODE",'-1'))
    LOGGING
    TABLESPACE WDSTAGE0T01
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE)
    INITIAL 1 M
    ACCORDING TO 1 M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    DEFAULT USER_TABLES
    )
    NOPARALLEL;


    CREATE INDEXES M23123MGR. SALE__ID ON M23123MGR. DW_SALES_DIM
    (PROJECT_SALE_CODE, CONTENT_ID)
    NOLOGGING
    TABLESPACE WDSTAGE0T01
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE)
    INITIAL 1 M
    ACCORDING TO 1 M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    DEFAULT USER_TABLES
    )
    NOPARALLEL;



    During execution of the ODI in interface the following M23123MGR. I have$ _DW_SALES_DIM is filled with the next index.

    CREATE
    INDEX M23123MGR. I HAVE$ _DW_SALES_DIM_ID ON M23123MGR. I _DW_SALES_DIM $
    (
    CONTENT_ID, PROJECT_SALE_CODE, PKG_SALE_CODE)
    NOLOGGING
    TABLESPACE WDSTAGE0T01
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE
    (
    INITIAL 1 M
    ACCORDING TO 1 M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    DEFAULT USER_TABLES
    )
    NOPARALLEL;



    The problem I encounter is that UPDATE the table takes too long. I need suggestions on how to call the same indexes in the table M23123MGR. DW_SALES_DIM in the M23123MGR table. I HAVE _DW_SALES_DIM$.

    There are at least 2 possible options to create indexes:

    (1) you can customize your KM to match your needs. You could look at the existing step 'create index' at km and change or add your own step "create index" in the same way.
    (2) also you might disable I drop $ objects optins in KM and manually create indexes on I$ table.

    But citing the index depends mainly on the OBC Oracle not ODI, ODI cause is E - LT technology.

  • index of output table and show what LOCAL indexes and who are

    I read the view of ALL_INDEXES here:
    http://www.Stanford.edu/dept/ITSS/docs/Oracle/10G/server.101/b10755/statviews_1061.htm
    But I still don't know how to query follows:

    1. display the name of the table, the index name and flag Y/N 'Is the local index' and a flag "is the overall index.

    The application should output table index and show what indexes are LOCAL and which are not.

    How to write this query?

    My original request:
    select table_name, Index_Name, Uniqueness, Partitioned, decode(Partitioned, 'NO', 'Global','Local') GlobalOrLocal from all_indexes
    where table_name = 'MyTABLE'
    2 I understand that global index for partitioned tables is a chunk of data referencing all the partitions table in the single room, but Local index is partitioned itself there are several parts each one or more partitions to reference table?

    Published by: CharlesRoos on October 6, 2010 12:45 AM

    CharlesRoos wrote:
    I read the view of ALL_INDEXES here:
    http://www.Stanford.edu/dept/ITSS/docs/Oracle/10G/server.101/b10755/statviews_1061.htm
    But I still don't know how to query follows:

    1. display the name of the table, the index name and flag Y/N 'Is the local index' and a flag "is the overall index.

    The application should output table index and show what indexes are LOCAL and which are not.

    How to write this query?

    My original request:

    select table_name, Index_Name, Uniqueness, Partitioned, decode(Partitioned, 'NO', 'Global','Local') GlobalOrLocal from all_indexes
    where table_name = 'MyTABLE'
    

    That seems Ok to me.

    2 I understand that for partitioned tables index global is a big piece of data referencing all the partitions table in the single room,

    Yes.

    but the Local index is partitioned itself there several pieces for each reference one or several partitions table?

    Almost right: each refers to score exactly one table. I.e. index partitioning is 'aligned' with the partitioning of the table.

  • Create index partition in the partition table tablespace

    Hello

    I am running a work custom that

    * Creates a tablespace by day
    * Creates the daily table partition in the created tablespace
    * Removes the days tablepartition X
    * Removes the storage space for this partition of X + 1 day.

    The work above works perfectly, but it has problems with the management of the index for these partitioned tables. In the old database (10g - single node), all indexes and partitions exist in a BIG tablespace and when I imported the table creation script in the new database, I changed all the partitions table & index to go in their respective space.

    For example:

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================............====================...........=================
    TABL1... TABL1_2012_07_16... TABL1_IDX_2012_07_16... TBS_2012_07_16
    TABL1... TABL1_2012_07_15... TABL1_IDX_2012_07_15... TBS_2012_07_15


    But now, when the job is run, it creates the index in the tablespace TBS_DATA default.

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================.............====================...........=================
    TABL1... TABL1_2012_08_16... TABL1_IDX_2012_08_16... TBS_DATA
    TABL1... TABL1_2012_08_15... TABL1_IDX_2012_08_15... TBS_DATA


    I can issue alter index rebuild to move the index to its tablespace default, but how can I make sure that the index is created in the designated tablespace?

    NOTE: the partition/tablespace management work that I run only creates the partition of the table and not the index.


    The new env is a cluster of CARS of 2 nodes 11 GR 2 on Linux x86_64.


    Thanks in advance,
    aBBy.

    try something like this

    ALTER table tab_owner.tab_name add the partition v_new_part_nm
    values less (to_date('''|| v_new_part_dt_formatted ||'') ((', "DD-MON-YYYY)) tablespace ' | part_tbs
    update the index (ind1_name (partition ind_partition_name tablespace ind_part_tbs)
    ind2_name (partition tablespace ind_part_tbs ind_partition_name))
    ;

  • Can I create an index on a partitioned table bitmap?

    Can I create an index on a partitioned table bitmap?

    Yes, you can. But an index on a partitioned table bitmap must be a local index.
    Image bitmap index on non partitioned tables cannot be partitioned.

  • 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.

  • Unusable index Partitioned table

    Oracle Version: 11.2.0.2
    OS: Linux RHEL 5

    I'm having a problem with the index on a partitioned table interval. This is the scenario:

    There are 3 indices (A, B, C) on a table. A is created on two columns (1,2), B is on the column (2), C is the column (3). Table is partitioned on column 2 apart. A and B are partitioned indexes. When I drop a partition without a clause to update index, Index C will unusable. After seeing this, I gave up the C rating and create it as a local partitioned index, then all indexes are in condition of use after the drop partition statement. Is - this mandatory on a range partitioned table all indexes on the table must be locally partitioned inorder to have indexes in usable state after the drop statement of partition (without the update index clause)? Also there will be a negative impact for all indexes on the table like locally partitioned indexes?

    >
    Is - this mandatory on a range partitioned table all indexes on the table must be locally partitioned inorder to have indexes in usable state after the drop statement of partition (without the update index clause)?
    >
    Yes - it should be obvious by looking at a simple example.

    You have an OVERALL index and drop a partition but say Oracle are NOT updating the overall index.

    How this index may be usable for anything? It is not accurate. There was GARBAGE everywhere that gets in the way of Oracle find the entries of the "good". There are the index keys in the branch blocks that belong to the partition that has been deleted. Oracle cannot use these keys to determine how the blocks of branch, he needs to find.
    >
    Also there will be a negative impact for all indexes on the table like locally partitioned indexes?
    >
    Who knows? There are maybe or maybe not.

    As with many things Oracle "it depends."

    It depends on what types of queries that you ran.

    It depends on the filter predicates used for query.

    It depends on if the maintenance simple score (add/drop/split) are important to you.

    For the maintenance of the partition only all index LOCAL is the best.

    For full table scan, an index is not intended to be used.

    For a query that needs all THE records for a COMPANY_ID given in a table partitioned by DATE an OVERALL index could be better. Oracle also use 100 index LOCAL (if there are 100 partitions) to get the same data.

    It depends on.

Maybe you are looking for

  • Can not download the English Installer

    Help me please. I just formatted and reinstalled windows and I can't install Firefox in English. All my settings to Setup have been updated with English (except my time zone). I went to http://www.mozilla.org/en-US/firefox/all.html tried all the Engl

  • HP Pavilion: Farmville2 and pokki

    I'd appreciate any help I can, I just found Farmville2 in my program list and I have not installed it. It does not allow me to uninstall as usual and I was not able to find an uninstaller for windows 10 on the web. There is no wealth like knowledge a

  • HP Jet 7 USB Repair

    My girls Stream 7 has a very loose USB connector. HP has a reference number? Is there a replacement part number? If she needs welding, I should be able to find steady hands and tools to do so. Resembling the removal of the card system will allow me t

  • 400 error, cannot connect to iTunes Store - and can not find S.o.s. keychain

    I don't know when the problem started. Possibly with El Capitan. The iTunes Store shows a pageful of proposed music, but any attempt actually nothing to do with the store evokes: We could not complete your iTunes Store request. An unknown error occur

  • How to start on Satellite A660 HARD drive recovery?

    I recently bought by Satellite A660 and the laptop has been infected with can of virus will start any program even couldn't do any disk recovery. So I try to read the FAQS and guidance that I tried to do the hard drive's default factory setting. I fo