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>

Similar Messages

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

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

  • Non-Partitioned Global Index on Range-Partitioned Table.

    Hi All,
    Is it possible to create Non-Partitioned Global Index on Range-Partitioned Table?
    We have 4 indexes on CS_BILLING range-partitioned table, in which one is CBS_CLIENT_CODE(*local partitioned index*) and others are unknown types of index to me??
    Means other 3 indexes are what type indexes ...either non-partitioned global index OR non-partitioned normal index??
    Also if we create index as :(create index i_name on t_name(c_name)) By default it will create Global index. Please correct me......
    Please help me in identifying other 3 indexes types by referring below ouputs!!!
    select INDEX_NAME,TABLE_NAME,PARTITIONING_TYPE,LOCALITY from dba_part_indexes where TABLE_NAME='CS_BILLING';
    INDEX_NAME TABLE_NAME PARTITI LOCALI
    CSB_CLIENT_CODE CS_BILLING RANGE LOCAL
    select index_name,index_type,table_name,table_type,PARTITIONED from dba_indexes where table_name='CS_BILLING';
    INDEX_NAME INDEX_TYPE TABLE_NAME TABLE_TYPE PAR
    CSB_CREATE_DATE NORMAL CS_BILLING TABLE NO
    CSB_SUBMIT_ORDER NORMAL CS_BILLING TABLE NO
    CSB_CLIENT_CODE NORMAL CS_BILLING TABLE YES
    CSB_ORDER_NBR NORMAL CS_BILLING TABLE NO
    select INDEX_OWNER,INDEX_NAME,TABLE_NAME,COLUMN_NAME from dba_ind_columns where TABLE_NAME='CS_BILLING';
    INDEX_OWNER INDEX_NAME TABLE_NAME COLUMN_NAME
    RPADMIN CSB_CREATE_DATE CS_BILLING CREATE_DATE
    RPADMIN CSB_SUBMIT_ORDER CS_BILLING SUBMIT_TO_INVOICE
    RPADMIN CSB_SUBMIT_ORDER CS_BILLING ORDER_NBR
    RPADMIN CSB_CLIENT_CODE CS_BILLING CLIENT_CODE
    RPADMIN CSB_ORDER_NBR CS_BILLING ORDER_NBR
    select dip.index_name, dpi.locality, dip.partition_name, dip.status
    from dba_part_indexes dpi, dba_ind_partitions dip
    where dpi.table_name ='CS_BILLING'
    and dpi.index_name = dip.index_name;
    INDEX_NAME LOCALI PARTITION_NAME STATUS
    CSB_CLIENT_CODE LOCAL CSB_2006_4Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2006_3Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2007_1Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2007_2Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2007_3Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2007_4Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2008_1Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2008_2Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2008_3Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2008_4Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2009_1Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2009_2Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2009_3Q USABLE
    CSB_CLIENT_CODE LOCAL CSB_2009_4Q USABLE
    select * from dba_part_indexes
    where table_name ='CS_BILLING'
    and locality = 'GLOBAL';
    no rows selected
    -Yasser
    Edited by: YasserRACDBA on Mar 5, 2009 11:45 PM

    Yaseer,
    Is it possible to create Non-Partitioned and Global Index on Range-Partitioned Table?
    Yes
    We have 4 indexes on CS_BILLING range-partitioned table, in which one is CBS_CLIENT_CODE(*local partitioned index*) and others are unknown types of index to me??
    Means other 3 indexes are what type indexes ...either non-partitioned global index OR non-partitioned normal index??
    You got local index and 3 non-partitioned "NORMAL" b-tree tyep indexes
    Also if we create index as :(create index i_name on t_name(c_name)) By default it will create Global index. Please correct me......
    Above staement will create non-partitioned index
    Here is an example of creating global partitioned indexes
    CREATE INDEX month_ix ON sales(sales_month)
       GLOBAL PARTITION BY RANGE(sales_month)
          (PARTITION pm1_ix VALUES LESS THAN (2)
           PARTITION pm2_ix VALUES LESS THAN (3)
           PARTITION pm3_ix VALUES LESS THAN (4)
            PARTITION pm12_ix VALUES LESS THAN (MAXVALUE));Regards

  • Indexes on a partitioned table

    hi experts.... which data dict view shows that an index on a partitioned table is,
    a Local Index or
    a Global Index or
    a Global Partitioned Index?

    Hi,
    LOCALITY column tells whether it is LOCAL or GLOBAL.
    See the link for more details.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2015.htm#REFRN20156
    Regards,

  • Spatial Index on list partition?

    Wondering if anyone has created a spatial index on a table that has a list partition. Documentation says only a range partition is supported.
    Also, when creating the partition, has anyone created the partitions in parallel? i.e. hohup a gang of jobs that work on each partition.

    Hi Steven,
    Oracle spatial partitioned indexing does not support list partitions.
    Also, parallel spatial indexing is supported as of Oracle 9iR2, but the
    parallelism implemented for partitioned indexing is partition-at-a-time
    parallelism, i.e. partition 1 is indexed in parallel, then partition 2, etc.
    Also implemented in 9iR2 is exchange partition, which allows you to
    build the partitions for each index separately in parallel, then exchange
    them in with very high index availability.
    Hope this helps,
    Dan

  • Creating index on large partitioned table

    Is anyone aware of a method for telling how far along is the creation of an index on a large partitioned table? The statement I am executing is like this:
    CREATE INDEX "owner"."new_index"
    ON "owner"."mytable"(col_1, col_2, col_3, col_4)
    PARALLEL 8 NOLOGGING ONLINE LOCAL;
    This is a two-node RAC system on Windows 2003 x64, using ASM. There are more than 500,000,000 rows in the table, and I'd estimate that each row is about 600-1000 bytes in size.
    Thank you.

    you can know the progress from v$session_longops.
    select
    substr(SID ||','||SERIAL# ,1,8) "sid,srl#",
    substr(OPNAME ||'>'||TARGET,1,50) op_target,
    substr(trunc(SOFAR/TOTALWORK*100)||'%',1,5) progress,
    TIME_REMAINING rem,
    ELAPSED_SECONDS elapsed
    from v$session_longops
    where SOFAR!=TOTALWORK
    order by sid;
    hth

  • Indexing on a Partitioned Table

    Hi, Everybody,
    I have already an partitioned table which has 8 partitions. I have indexes also on this partitiioned table. I have created the partioned indexes. It is partitioned by range. I have now added 3 more partitions and inserted data into the 3 new partitions.
    Now my question is :
    1. Can i create indexes only on the new partitions? What is the syntax?
    2. Or should i drop all the indexes and create new indexes for all the partitions again?
    Thanks in advance...
    Regards

    Can i create indexes only on the new partitions? I give up. Can you?
    What is the syntax?http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5010.htm#sthref6509
    Or should i drop all the indexes and create new indexes for all the partitions again?What would be gained by doing so?

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

  • BUG ? Create index on a partitioned table drops the complete table !

    Hi ...
    now i had twice the problem when i tried to create a local index (with 2 fields) on a partitioned table .
    I set initrans to 1 and maxtrans to 255 (i know - initrans has to be at least 2).
    I got an error - and the table (including the data) was gone ... :-((
    Has anybody the same behavior and is it a bug ??
    Christian

    See 1.5 Bad bug when creating index fails.
    Have fun,
    K.

  • 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

  • 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

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

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

  • Bitmap Join Index on Partitioned Table

    Are there any restrictions on creating a bitmap join index on a partition table (I think that the bitmap indexes can only be created as local on partitioned tables)?
    Thanks in advance
    Murthy.

    Fair enough. I've included a cut-down set of SQL below.
    CREATE TABLE DIMENSION_DATE
    DATE_ID NUMBER,
    CALENDAR_DATE DATE,
    CONSTRAINT DATE_ID
    PRIMARY KEY
    (DATE_ID)
    CREATE UNIQUE INDEX DATE_I1 ON DIMENSION_DATE
    (CALENDAR_DATE, DATE_ID);
    CREATE TABLE ORDER_F
    ORDER_ID VARCHAR2(40 BYTE),
    SUBMITTEDDATE_FK NUMBER,
    COMPLETEDDATE_FK NUMBER,
    -- Then I add the first bitmap index, which works:
    CREATE BITMAP INDEX SUBMITTEDDATE_FK ON ORDER_F
    (DIMENSION_DATE.DATE_ID)
    FROM ORDER_F, DIMENSION_DATE
    WHERE ORDER_F.SUBMITTEDDATE_FK = DIMENSION_DATE.DATE_ID;
    -- Then attempt the next one:
    CREATE BITMAP INDEX completeddate_fk
    ON ORDER_F(b.date_id)
    FROM ORDER_F, DIMENSION_DATE b
    WHERE ORDER_F.completeddate_fk = b.date_id;
    -- which results in:
    -- ORA-01408: such column list already indexed

Maybe you are looking for