Creating DOMAIN INDEX on INTERVAL PARTITIONING

Hi !
I hava a problem, and I hope someone can help me!
Two questions are asked below:
1. Main question: HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
2. Additionally: Is there a way to accelerate the deletion process
Step 1: Creating the table* For Information how I create the table:
CREATE TABLE LOC_EXAMPLE
COLUMN1 NUMBER
COLUMN2 NUMBER
COLUMN3 NUMBER
COLUMN4 NUMBER
START_TIME TIMESTAMP
GEOLOC MDSYS.SDO_GEOMETRY,
TABLESPACE DB_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOLOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING
PARTITION BY RANGE (START_TIME)
INTERVAL (NUMTODSINTERVAL(1,'DAY'))
     PARTITION PART_LOC_EXAMPLE VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
ALTER TABLE LOC_EXAMPLE
ADD CONSTRAINT PK_LOC_EXAMPLE PRIMARY KEY (COLUMN2,COLUMN4)
DELETE FROM USER_SDO_GEOM_METADATA VALUE WHERE TABLE_NAME = 'LOC_EXAMPLE'
INSERT INTO USER_SDO_GEOM_METADATA VALUES ('LOC_EXAMPLE','GEOLOC', MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.001111949), MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.001111949) ), 8307)
STEP 2: I TRY TO CREATE SPATIAL INDEX (ITS A DOMAIN INDEX IF I'M NOT WRONG) ON PARTITIONED TABLE*
(PARTITIONED TABLE is an extension of range partitioning)
CREATE INDEX LOC_EXAMPLE_idx ON LOC_EXAMPLE'(GEOLOC)
INDEXTYPE IS MDSYS.SPATIAL_INDEX LOCAL;
THE SECOND STEP IS NOT POSSIBLE AS THE ORACLE DOCUMENTATION SAYS:
When using interval partitioning, consider the following restrictions:
-You can only specify one partitioning key column, and it must be of NUMBER or DATE type.
-Interval partitioning is not supported for index-organized tables.
-You cannot create a domain index on an interval-partitioned table.
1) I THINK IT IS IMPOSSIBLE FOR ME TO PASS ON INTERVAL PARTITIONING (AMOUNT OF DATA IS REALY BIG).
This partitioning is also used to delete datas from database once a mounth (scheduled on the basis of the partitions).
Is there a way to accelerate the deletion process?
2) I NEED A SPATIAL INDEX! NO WAY TO PASS ON IT!
HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
Why is it not possible to create a domain index on interval partitioning, any reason?
Will this be possible anytime?
I would be grateful to read any advise ...!
Thanking you in anticipation,
Ali

There is a forum here at OTN for spatial. Please delete the contents of this post and ask your question there. Thanks.

Similar Messages

  • Creating DOMAIN INDEX (SPATIAL) on INTERVAL PARTITIONING

    Hi !
    I hava a problem, and I hope someone can help me!
    Two questions are asked below:
    1. Main question: HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    2. Additionally: Is there a way to accelerate the deletion process
    Step 1: Creating the table For Information how I create the table:
    CREATE TABLE LOC_EXAMPLE
    COLUMN1 NUMBER
    COLUMN2 NUMBER
    COLUMN3 NUMBER
    COLUMN4 NUMBER
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    TABLESPACE DB_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING
    PARTITION BY RANGE (START_TIME)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    PARTITION PART_LOC_EXAMPLE VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    ALTER TABLE LOC_EXAMPLE
    ADD CONSTRAINT PK_LOC_EXAMPLE PRIMARY KEY (COLUMN2,COLUMN4)
    DELETE FROM USER_SDO_GEOM_METADATA VALUE WHERE TABLE_NAME = 'LOC_EXAMPLE'
    INSERT INTO USER_SDO_GEOM_METADATA VALUES ('LOC_EXAMPLE','GEOLOC', MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.001111949), MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.001111949) ), 8307)
    STEP 2: I TRY TO CREATE SPATIAL INDEX (ITS A DOMAIN INDEX IF I'M NOT WRONG) ON PARTITIONED TABLE
    (PARTITIONED TABLE is an extension of range partitioning)
    CREATE INDEX LOC_EXAMPLE_idx ON LOC_EXAMPLE'(GEOLOC)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX LOCAL;
    THE SECOND STEP IS NOT POSSIBLE AS THE ORACLE DOCUMENTATION SAYS:
    When using interval partitioning, consider the following restrictions:
    -You can only specify one partitioning key column, and it must be of NUMBER or DATE type.
    -Interval partitioning is not supported for index-organized tables.
    -You cannot create a domain index on an interval-partitioned table.
    1) I THINK IT IS IMPOSSIBLE FOR ME TO PASS ON INTERVAL PARTITIONING (AMOUNT OF DATA IS REALY BIG).
    This partitioning is also used to delete datas from database once a mounth (scheduled on the basis of the partitions).
    Is there a way to accelerate the deletion process?
    2) I NEED A SPATIAL INDEX! NO WAY TO PASS ON IT!
    HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    Why is it not possible to create a domain index on interval partitioning, any reason?
    Will this be possible anytime?
    I would be grateful to read any advise ...!
    Thanking you in anticipation,
    Ali

    Is it possible to just use a normal range-partitioned table?
    CREATE TABLE LOC_EXAMPLE
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    PARTITION BY RANGE (START_TIME)
    PARTITION P1 VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    alter table loc_example add partition p2 VALUES LESS THAN (TO_DATE('02-01-2008','dd-MM-yyyy'));
    alter table loc_example drop partition p1;
    I understand it is not as perfect as interval partitioning, since
    you have to drop an old partition/add a new one either manually
    or by some script. But you should be able to create a spatial domain index
    on it.

  • Domain index on list-partitioned table?

    Hi,
    I have a list-partitioned table, and wanted to create a partitioned Oracle Text index on it. I keep getting an error, and am now wondering if it's possible to do. Here is my syntax:
    CREATE INDEX SCHEMA1.IDX_ALL_TEXT_LOCAL ON SCHEMA1.TABLE1(ALL_TEXT)
    INDEXTYPE IS CTXSYS.CONTEXT
    LOCAL
    (PARTITION PTN1 PARAMETERS('sync (on commit) storage ptn1'),
    PARTITION PTN2 PARAMETERS('sync (on commit) storage ptn2'),
    PARTITION PTN3 PARAMETERS('sync (on commit) storage ptn3'),
    PARTITION PTN4 PARAMETERS('sync (on commit) storage ptn4'),
    PARTITION PTN5 PARAMETERS('sync (on commit) storage ptn5'),
    PARTITION PTN6 PARAMETERS('sync (on commit) storage ptn6'),
    PARTITION PTN7 PARAMETERS('sync (on commit) storage ptn7'),
    PARTITION PTN8 PARAMETERS('sync (on commit) storage ptn8')
    PARAMETERS('section group my_group lexer new_lexer');
    ERROR at line 1:
    ORA-29850: invalid option for creation of domain indexes
    Any advice would be much appreciated.
    Thanks,
    Nora

    ... will it spread the index across the tablespaces that are associated with each partition?No, as demonstrated below.
    SCOTT@orcl_11gR2> CREATE TABLE table1
      2       ( id         NUMBER(6),
      3         all_text      VARCHAR2 (20)
      4       )
      5  PARTITION BY LIST (id)
      6   (PARTITION ptn1 VALUES (2,4) TABLESPACE example,
      7    PARTITION ptn2 VALUES (3,9) TABLESPACE example
      8   )
      9  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO table1 VALUES (2, 'test2')
      3  INTO table1 VALUES (3, 'test3')
      4  INTO table1 VALUES (4, 'test4')
      5  INTO table1 VALUES (9, 'test9')
      6  SELECT * FROM DUAL
      7  /
    4 rows created.
    SCOTT@orcl_11gR2> CREATE INDEX IDX_ALL_TEXT_LOCAL
      2  ON TABLE1 (ALL_TEXT)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
      2  FROM   user_tab_partitions
      3  WHERE  table_name = 'TABLE1'
      4  /
    TABLE_NAME                     TABLESPACE_NAME
    TABLE1                         EXAMPLE
    TABLE1                         EXAMPLE
    2 rows selected.
    SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
      2  FROM   user_tables
      3  WHERE  table_name LIKE '%IDX_ALL_TEXT_LOCAL%'
      4  /
    TABLE_NAME                     TABLESPACE_NAME
    DR$IDX_ALL_TEXT_LOCAL$I        USERS
    DR$IDX_ALL_TEXT_LOCAL$R        USERS
    DR$IDX_ALL_TEXT_LOCAL$N
    DR$IDX_ALL_TEXT_LOCAL$K
    4 rows selected.
    SCOTT@orcl_11gR2>

  • Issue creating domain index

    what lob error? This is a domain index on a clob. I don't have any special settings.
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in drvxtab.create_index_tables
    ORA-22853: invalid LOB storage option specification
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
    CREATE INDEX myind ON
    my_mv(my_text)
    INDEXTYPE IS ctxsys.context
    PARAMETERS('MEMORY 500m FILTER INSOFilterpref STORAGE bfile_storage')
    PARALLEL 4;

    I remember this error when dealing with InterMedia. Specifically with Maximo.
    I believe you need to set and define your global lexer.
    Another key was to grant 'all privileges' to ctxsys within Oracle.
    There is definitely a lot more to this than what I mentioned.
    There are entire books on setting this up and tuning it.

  • 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

  • Create table interval partition on a column timestamp with local time zone

    Hi
    Does anyone have an example for 11g on how to create a table with interval partitioning on a column defined as timestamp with local time zone. I know it's possible. the following does not work.
    CREATE TABLE KOMODO_EXPIRED_RESULTS
    TEST_EVENT_KEY NUMBER NOT NULL,
    HPS_DEVICE_KEY NUMBER NOT NULL,
    RCS_DEVICE_KEY NUMBER,
    EVENT_START_TIMESTAMP TIMESTAMP(6) with local time zone NOT NULL,
    BOOTROMVERSION NUMBER,
    CHANNELNUMBER NUMBER,
    CLIENTVERSION VARCHAR2(4000 BYTE),
    ETHERNET_CRC_ERROR_COUNT NUMBER,
    ETHERNET_DROPPED_PACKETS NUMBER,
    ETHERNET_THROUGHPUT NUMBER,
    ETHERNET_TRAFFIC_IN NUMBER,
    ETHERNET_TRAFFIC_OUT NUMBER,
    IPADDRESS VARCHAR2(4000 BYTE),
    KOMODO_ID VARCHAR2(4000 BYTE),
    LASTREBOOTTIME VARCHAR2(4000 BYTE),
    OSVERSION VARCHAR2(4000 BYTE),
    RECEIVER_AUDIOACCESSCONTROLER NUMBER,
    RECEIVER_AUDIOBUFFEROVERFLOWS NUMBER,
    RECEIVER_AUDIOBUFFERUNDERRUNS NUMBER,
    RECEIVER_AUDIOCODEC VARCHAR2(4000 BYTE),
    RECEIVER_AUDIODATADROPPED NUMBER,
    RECEIVER_AUDIODATATHROUGHPUT NUMBER,
    RECEIVER_AUDIODECODERERRORS NUMBER,
    RECEIVER_AUDIODESCBUFFERUNDER NUMBER,
    RECEIVER_AUDIODESCCRYPTOERROR NUMBER,
    RECEIVER_AUDIODESCDATADROPPED NUMBER,
    RECEIVER_AUDIODESCDATATHROUGH NUMBER,
    RECEIVER_AUDIODESCDECODERERRO NUMBER,
    RECEIVER_AUDIODESCDRMERRORS NUMBER,
    RECEIVER_AUDIODESCPTSDELTA NUMBER,
    RECEIVER_AUDIODESCPTSDELTAHAL NUMBER,
    RECEIVER_AUDIODESCSAMPLESDROP NUMBER,
    RECEIVER_AUDIODSPCRASHES VARCHAR2(4000 BYTE),
    RECEIVER_AUDIOPTSDELTAHAL NUMBER,
    RECEIVER_AUDIOSAMPLESDECODED NUMBER,
    RECEIVER_AUDIOSAMPLESDROPPED NUMBER,
    RECEIVER_AUDIOUNDERRUN NUMBER,
    RECEIVER_BITRATE NUMBER,
    RECEIVER_BUFFEROVERRUN NUMBER,
    RECEIVER_BYTESCCRECEIVED NUMBER,
    RECEIVER_BYTESRECEIVED NUMBER,
    RECEIVER_CHANNEL NUMBER,
    RECEIVER_DECODERSTALL NUMBER,
    RECEIVER_DISCONTINUITIES NUMBER,
    RECEIVER_DISCONTINUITIESPACKE NUMBER,
    RECEIVER_DRIFT NUMBER,
    RECEIVER_DROPPEDPACKETSUNTILR NUMBER,
    RECEIVER_ECMLOOKUPERROR NUMBER,
    RECEIVER_ECMPARSEERRORS NUMBER,
    RECEIVER_PMTCHANGED NUMBER,
    RECEIVER_REBUFFER NUMBER,
    RECEIVER_SELECTCOMPONENTAUDIO NUMBER,
    RECEIVER_TIMELINEDISCONTINUIT NUMBER,
    RECEIVER_VIDEOACCESSCONTROLER NUMBER,
    RECEIVER_VIDEOACCESSCONTROLUN NUMBER,
    RECEIVER_VIDEOBUFFEROVERFLOWS NUMBER,
    RECEIVER_VIDEOBUFFERUNDERRUNS NUMBER,
    RECEIVER_VIDEOCODEC VARCHAR2(4000 BYTE),
    RECEIVER_VIDEOCRYPTOERROR NUMBER,
    RECEIVER_VIDEODATADROPPED NUMBER,
    RECEIVER_VIDEODATATHROUGHPUT NUMBER,
    RECEIVER_VIDEODECODERERRORS NUMBER,
    RECEIVER_VIDEODRMERRORS NUMBER,
    RECEIVER_VIDEODSPCRASHES VARCHAR2(4000 BYTE),
    RECEIVER_VIDEOFIFORD NUMBER,
    RECEIVER_VIDEOFIFOSIZE NUMBER,
    RECEIVER_VIDEOFRAMESDECODED NUMBER,
    RECEIVER_VIDEOFRAMESDROPPED NUMBER,
    RECEIVER_VIDEOPTSDELTA NUMBER,
    RECEIVER_VIDEOPTSDELTAHAL NUMBER,
    RECEIVER_VIDEOUNDERRUN NUMBER,
    SUBNETMASK VARCHAR2(4000 BYTE),
    TUNER_BITRATE NUMBER,
    TUNER_BUFFERFAILURE NUMBER,
    TUNER_CCPACKETSRECEIVED NUMBER,
    TUNER_CHANNEL NUMBER,
    TUNER_DATATIMEOUTS NUMBER,
    TUNER_DELIVERYMODE VARCHAR2(4000 BYTE),
    TUNER_DROPPAST NUMBER,
    TUNER_FILL NUMBER,
    TUNER_HOLE NUMBER,
    TUNER_HOLEDURINGBURST NUMBER,
    TUNER_HOLEDURINGBURSTPACKETS NUMBER,
    TUNER_HOLETOOLARGEPACKETS NUMBER,
    TUNER_MAXIMUMHOLESIZE NUMBER,
    TUNER_MULTICASTADDRESS VARCHAR2(4000 BYTE),
    TUNER_MULTICASTJOINDELAY NUMBER,
    TUNER_OUTOFORDER NUMBER,
    TUNER_OVERFLOWRESET NUMBER,
    TUNER_OVERFLOWRESETTIMES NUMBER,
    TUNER_PACKETSEXPIRED NUMBER,
    TUNER_PACKETSPROCESSED NUMBER,
    TUNER_PACKETSRECEIVED NUMBER,
    TUNER_PACKETSWITHOUTSESSION NUMBER,
    TUNER_PARSEERRORS NUMBER,
    TUNER_SRCUNAVAILABLERECEIVED NUMBER,
    TUNER_TOTALHOLEPACKETS NUMBER,
    TUNER_TOTALPACKETSEXPIRED NUMBER,
    TUNER_TOTALPACKETSRECEIVED NUMBER,
    TUNER_UNICASTADDRESS VARCHAR2(4000 BYTE),
    RECEIVER_TUNEDFOR NUMBER,
    MACADDRESS VARCHAR2(4000 BYTE),
    RECEIVER_TOTALAVUNDERRUNS NUMBER,
    RECEIVER_TOTALDISCONTINUITIES NUMBER,
    SERVICEID VARCHAR2(4000 BYTE),
    DRIVEPRESENT VARCHAR2(4000 BYTE),
    STB_STATE VARCHAR2(32 BYTE),
    PREV_EXPIRED NUMBER,
    PREV_HOLES NUMBER,
    PREV_RECEIVED NUMBER,
    PREV_TIMESTAMP TIMESTAMP(6),
    PREV_REBOOT VARCHAR2(4000 BYTE),
    TOTALPACKETSEXPIRED_RATE NUMBER,
    TOTALHOLEPACKETS_RATE NUMBER,
    TOTALPACKETSRECEIVED_RATE NUMBER,
    CONSTRAINT KOMODO_EXPIRED_RESULTS_PK
    PRIMARY KEY
    (HPS_DEVICE_KEY, EVENT_START_TIMESTAMP)
    USING INDEX
    TABLESPACE HPS_SUMMARY_INDEX
    TABLESPACE HPS_SUMMARY_DATA
    PARTITION BY RANGE (EVENT_START_TIMESTAMP)
    INTERVAL( NUMTODSINTERVAL(1,'DAY'))
    PARTITION DEFAULT_TIME_PART_01 VALUES LESS THAN (TIMESTAMP' 2010-08-01 00:00:00.000000000 +00:00')
    LOGGING
    COMPRESS FOR ALL OPERATIONS
    TABLESPACE HPS_SUMMARY_DATA
    NOCACHE
    PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT )
    MONITORING
    /

    I am not sure it can be done.
    SQL> create table sales
      2  (
      3  sales_id number,
      4  sales_dt TIMESTAMP(6) with local time zone NOT NULL
      5  )
      6  partition by range (sales_dt)
      7  interval (numtoyminterval(1,'MONTH'))
      8  ( partition p0901 values less than (to_date('2009-02-01','yyyy-mm-dd')) );
    create table sales
    ERROR at line 1:
    ORA-14751: Invalid data type for partitioning column of an interval partitioned
    table
    SQL> ed
    Wrote file afiedt.buf
      1  create table sales
      2  (
      3  sales_id number,
      4  sales_dt TIMESTAMP(6)
      5  )
      6  partition by range (sales_dt)
      7  interval (numtoyminterval(1,'MONTH'))
      8* ( partition p0901 values less than (to_date('2009-02-01','yyyy-mm-dd')) )
    SQL> /
    Table created.

  • How to create index on specific partition table?

    Hi Experts,
    we created 4 partitions on table .
    Table Name : test
    partitions : Test_prt1
                       Test_prt2
                       Test_prt3
                      Test_prt4
    Our requiremnt  create the index on specific partition (ex : Test_prt2) only.

    Creating Partitioned Tables and Indexes
    http://technet.microsoft.com/en-us/library/ms187526(v=sql.105).aspx
    you can create a aligned index, the index will be spread over the filegroups
    Create NonClustered Index IX_orders_aligned
    On dbo.orders(order_id)
    On test_monthlyDateRange_ps(orderDate);
    OR
    Unaligned parition, you can create index on any filegroups
    Create NonClustered Index IX_orders_unpartitioned
    On dbo.orders(order_id)
    On [Test_prt2_FileGroup];
    For more information refer the below link
    http://sqlfool.com/2008/12/indexing-for-partitioned-tables/
    Or
    You can try Creating a filtered index (I've not tried it though)
    http://www.mssqltips.com/sqlservertip/1785/sql-server-filtered-indexes-what-they-are-how-to-use-and-performance-advantages/
    --Prashanth

  • Local Domain Index  query fails with ora-01410: invalid rowid

    Hello!
    I have a task to implement partitioned domain index for range partitioned table.
    As I understood from reference http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28425/dom_idx.htm
    the main difference is to provide support for partitioning operations by
    implementing corresponding ODCI interface functions.
    For the first I decided to create something simple to not spend time on system partitioned
    index storage table. My problem is that domain index works correctly when it's created without
    support for partitioning and produces "*ORA-01410: INVALID ROWID*" when it's created
    with LOCAL option.
    Test query:
    SELECT /* +index(from_sample_index) */ * FROM index_in_partitioned_tbl WHERE position_between(card_no)  < 50 ORDER BY card_no DESC;
    Index creared in this way returns 3 rows:
    CREATE INDEX from_sample_index ON index_in_partitioned_tbl (card_no) INDEXTYPE IS position_indextype;
    When index has been creared with LOCAL option I got "ORA-01410: INVALID ROWID" :
    CREATE INDEX from_sample_index ON index_in_partitioned_tbl (card_no) INDEXTYPE IS position_indextype LOCAL;
    I don't post implementation's source code to reduce amount of text in post. It works for global index.
    If I copy rowid from index storage table and then put it into something like
    SELECT card_no FROM index_in_partitioned_tbl WHERE rowid = 'AAAXHGAAEAAAFERAAh';
    then it will be executed successfully without any errors.
    I suppose the error could be somehow linked with "alter index" calls that Oracle makes when local domain index is created.
    The calls are made with option "AlterIndexRebuild" - possibly they mark index as invalid (though it's shown as valid in SQL Developer)

    Solved :)
    when index is LOCAL calls for ODCIINDEXSTART - ODCIINDEXFETCH - ODCIINDEXCLOSE are executed for each partition of base table.
    In my case ODCIINDEXFETCH returns row_id's regardless of partition that are currently scanned for values. So first call returned rowid values for all partitions not only for the first partition and validation failed with "ora-01410: invalid rowid"

  • ORA-06502: when creating a index

    Hi,
    i'm trying to create an index on a partitionned table, but i'm getting this error :
    CREATE INDEX IDX_NDI_WTSCDRHISTO ON WTS_CDRHISTO(SUBSTR(NDI, GREATEST(LENGTH(NDI)-8,1))) Compress Local (
    PARTITION WTS_CDRHISTO_2009070412 NOLOGGING COMPRESS TABLESPACE INDX_CDRHISTO_7 PCTFREE 0 INITRANS 2,
    PARTITION WTS_CDRHISTO_2009070413 NOLOGGING COMPRESS TABLESPACE INDX_CDRHISTO_7 PCTFREE 0 INITRANS 2,
    PARTITION WTS_CDRHISTO_2009070414 NOLOGGING COMPRESS TABLESPACE INDX_CDRHISTO_7 PCTFREE 0 INITRANS 2,
    PARTITION WTS_CDRHISTO_2009070414 NOLOGGING COMPRESS TABLESPACE INDX_CDRHISTO_7 PCTFREE 0 INITRANS 2,
    PARTITION WTS_CDRHISTO_2010070800 NOLOGGING COMPRESS TABLESPACE INDX_CDRHISTO_7 PCTFREE 0 INITRANS 2
    PARALLEL 16;
    the error code is : ORA-06502: PL/SQL: numeric or value error: character string buffer too small ???!!!!!!
    Anyone can help me ?
    Thks in advance

    Post the section of code that is causing problem along with statements before and after the section as well.
    For now, I can take a guess that you are trying to assign this entire statement as a string to a character variable. If so, then that variable length definition is too small to hold this entire string. In PL/SQL you can define VARCHAR2 to a maximum of 32767.

  • Creating local indexes

    Hi,
    we are using db partitioning (Daily partition, Range partition) for sub_eve (partitioned on timestamp field) table. the daily partition contains 173millians on rows daily 40gb. i want to create local indexes for on partitioned key field.
    1 suggest me the beset way to create indexes on this huge table.
    2 is there a way i can create indexes for perticular partitions only.
    my setup looks below.
    OS : solaris X64
    DB : 10.2.0.1
    we are using ASM for datafiles.
    regards
    sachin

    user990143 wrote:
    Thanks for the response, yes you said correct regarding indexes on single partition. I don't want my loading should be affected bcos of indexes. I load partitions using CTAS.
    To explain - I have a self rolled generic package that takes SQL statement, partition table and partition name as input. This package then create a staging table, add the same (local) indexes to it as on the partition table, and then replace the source partition with the contents of the table using a partition exchange. After which the staging table is dropped and purged.
    The reason for this method that, in my case, it is horribly expensive to refresh a partition with new data - i.e. a delete of the partition contents, followed by an insert.
    What is faster is a truncate of the partition and then the insert. But as the table is used 24x7, any process querying data for that partition during this partition update period, will run into an empty and truncated partition. I need the partition data to be there until the very last second when the fresh data can be made available.
    Thus the CTAS of a staging table, adding indexes, and then doing a partition exchange that includes indexes and requires no validation. This is typically a sub-second DDL - allowing me to replace a partition (containing millions of rows and GB's in size) with a new data set near instantaneously. Minimal impact to production and customers running queries against the data. No index rebuilding required.

  • Interval Partitioning

    Hi everyone,
    I've got a question about interval partitioning. I've got a fact table, W_GL_BALANCE_F that is fairly massive and I want to use interval partitioning on the BALANCE_DT_WID field. The values in the field are of the form YYYYMMDD || '000', i.e. 20100820000 would be today, 20100821000 would be tomorrow, etc.
    I create the table with interval partitioning with an interval of 1000, and then when I go to insert the data, I get the error "Partition does not exist". I was a little confused because I thought interval partitions created partitions for any new value.
    I ran some tests on a test table part_test(part_key number) partition range interval (1) ( partition "zero" less than 1). Then I inserted a few test records
    INSERT INTO part_test (part_key) values (1);
    INSERT INTO part_test (part_key) values (2);
    INSERT INTO part_test (part_key) values (10);
    INSERT INTO part_test (part_key) values (1000000); --- This causes error "Partition does not exist"
    Obviously there are some additional rules to go along with using the intervals. I was under the impression that it would just create a range for any new value but it seems more complicated than that.
    Can someone explain to me why the final record isn't able to have a new partition created for it?
    I apologize if this is a dumb question, but I'm a little new to the different partitioning options.
    Best regards and thanks for the help!
    -Joe

    Joe Bertram wrote:
    Hi Tubby,
    Just to give you a little more background, I am working with the Oracle BI Applications prepackaged data warehouse and ETLs. Because it's all prepackaged ETLs, I don't have too much flexibility to change the data being loaded, otherwise, I totally agree that using this date format is kind of strange. Thanks for the information, helps to know :)
    Joe Bertram wrote:
    I looked at other fields on the table for a potential partition key, and this field was the only one that was remotely uniformly distributed. That really isn't the first consideration you should have for partitioning. What are you trying to accomplish with partitioning? Are you looking to make data archival easier (dropping old partitions is the easiest way to go), or are you looking to enhance querying? Partitioning is a tool you implement for a given purpose ... so what's yours?
    Joe Bertram wrote:>
    You are correct, my test case was a little simplistic. I went back to the data the see why your case succeeded and mine failed. It turns out I missed one part in the date format. In addition to the date format as I laid it out, they also append the calendar ID which refers to the fiscal calender to which the date belongs. the actual format is <4-digit-cal_id>YYYYMMDD<000> i.e. 100120100820000 is today on calendar 1001, but there could also be a calendar 1007 which could have today's date i.e. 100720100820000.
    drop table part_test;
    create table part_test
    part_key number
    partition by range (part_key)
    interval (1000)
    partition zero_1 values less than (100120100820000)
    INSERT INTO part_test (part_key) values (100120100820000);
    INSERT INTO part_test (part_key) values (100720100820000); -- same day on calendar 1007, causes an errorIt pretty much seems to me that there would be too many potential partitions, so the DB gives up. Is that correct?That indeed seems to be the case, you could perhaps raise a service request with Oracle, but i'm not sure how eager they'd be to enhance the interval partitioning for this case. This data doesn't seem like it would be a good candidate for range partitioning. Again, we need to know what you're goal is from partitioning.
    If housekeeping is paramount (keeping X days of data and purging old data) then i would suggest the following.
    create table part_test
       part_key       number,
       magic_column   generated always as ( to_date(substr (part_key, 5, 8), 'yyyymmdd') ) virtual
       partition by range (magic_column)
       INTERVAL ( INTERVAL '1' DAY)
       partition zero_1 values less than ( to_date('20100820', 'yyyymmdd') )
    );Partitioning by a virtual column, the date in this case.
    It's possibly you have a more logical key to partition off of, but a RANGE partition scheme on your part_key doesn't sound good at all.

  • Ora-29886 feature not supported for domain indexes ??

    Could anyone tell me the reason for the following error
    ora-29886 feature not supported for domain indexes
    What are domain indexes ..??
    Thanks in advance ..

    It would have been better if you posted the statement that caused the error.
    If you are using something like MERGE INTO, it is not supported with with Domain Indexes. Workaround is to complete your insert with individual insert statements or drop the Domain Index before insert and recreate the index after insert
    Domain indexes are built for specific applications (specific domain) like Oracle text, Oracle Spatial etc. So depending on what application you are running, you might be using domain indexes. You create domain indexes as you create b-tree indexes, but the difference is that you have to define the INDEXTYPE.
    You can find domain indexes in DBA_SECONDARY_OBJECTS. Find the index on the table you are using, then check the definition of the index and see what it looks like.

  • How to index a column in an interval partitioned table

    Hi -
    I see that domain indexes are not allowed on a table which has interval partitioning on it.
    Given this limitation, is there any way to improve performance on wildcard searches (like '%condition%';) on a VARCHAR(2) column in a table which has interval partitioning?
    Or are we SOL if we want to do this?
    Thanks for any advice or experience in this area.
    LJ

    There's no real good way to make non-domain-indexed text queries fast. If there was, the Text forum wouldn't be the lively place it is today!
    But SOL? No, I wouldn't call you SOL... There are always ways to do stuff, just depends on how important it is to you, how much space/time/maintenance you're willing to do to make things work.
    For example, create a non-interval-partitioned materialized view of your target table/column and use a domain index on that.
    What constraints or options do you have (or think you have) in order to make this work?

  • Interval partitioning indexes

    Hi,
    I am unable to get the indexes interval partitioned, it always throws "ORA-00906: missing left parenthesis"
    Example:
    -- interval partitioning the table works fine as below
    create table t1 (partitionID number, name varchar2(200))
    partition by range (partitionID) interval (1)
    (partition p1 values less than (2))
    -- Now, lets try building a global interval partitioned index on this
    -- Though it is possible to simply tag it as local, I would like to create it as global for other reasons
    create unique index t1_u1 on t1(partitionID) global
    partition by range (partitionID) interval (1)
    (partition p1 values less than (2))
    Index creation as above fails for me with "ORA-00906: missing left parenthesis" and I can't figure out why it is doing so.
    I tried to see if I can range partition the index and add interval later, but that fails too
    SQL> create unique index t1_u1 on t1(partitionID) global
    2 partition by range (partitionID)
    3 (partition p1 values less than (MAXVALUE));
    Index created.
    SQL> alter index t1_u1 set interval (1);
    alter index t1_u1 set interval (1)
    ERROR at line 1:
    ORA-02243: invalid ALTER INDEX or ALTER MATERIALIZED VIEW option
    Isn't interval partitioning not supported for indexes ?

    Isn't interval partitioning not supported for indexes ?When all else fails, Read The Fine Manual
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1008.htm#i2050158

  • Creating a bit map index on a partitioned table

    Dear friends,
    I am trying to create a bitmap index on a partitioned table but am receiving the following ORA error. Can you please let me know on how to create a local bit map index as the message suggests?
    ERROR at line 1:
    ORA-25122: Only LOCAL bitmap indexes are permitted on partitioned tables
    Trying to use the keyword local in front leads to wrong syntax.
    Thanks in advance !!
    Somnath

    ORA-25122 Only LOCAL bitmap indexes are permitted on partitioned tables
    Cause: An attempt was made to create a global bitmap index on a partitioned table.
    Action: Create a local bitmap index instead
    Example of a Local Index Creation
    CREATE INDEX employees_local_idx ON employees (employee_id) LOCAL;
    Example is about btree and I think it will work for bitmap also.

Maybe you are looking for

  • ITunes won't open after installing update.

    After installing the latest itunes update, itunes won't open at all. I click on it and it just won't open. I tried uninstalling and reinstalling and it still doesn't work.

  • Addition in drill down option in report RMCE0200 for transaction MC$4

    Hello Gurus , I am working on a requirement assciated with report RMCE0200 (Transaction MC$4). This a standard SAP report. After execution of report when we go to Switch Drilldown option, it gives, couple of standard SAP drilldown options like drilld

  • How do you import while using full screen in iPhoto?

    I am running Lion with the latest version of iPhoto, and have been getting used to the full screens.  Is there any way to import photos into iPhoto while the full screen function is enabled?  I am using an iPhone 4 and a Sony NEX-5, each of which wou

  • Color managed apps have poor blue performance

    Hi. I'm having trouble with calibrated displays on multiple macs. In all cases saturated blues look very purple. The easiest way to see it is by looking at the highlight in the system menu which should be blue and instead is purple. Other ways to see

  • How to reset iphone3GS to factory setting?

    Hi, I recently lost my iphone3GS. Need to know is there any way that I ( or apple support) reset the phone to factory settings. I do have EIN with me. Thanks in advance.