Range interval partitioning - ability to set tablespace?

Hi,
We have a range partitioned table, considering making it a range-interval partitioned one.
I know can query/identify partitions by using syntax to the range to which the partition relates.
If set to range interval, wht tablespace are new ones created in, is it the default tablespace of the database or can you ensure they are automatcially created in specific tablespace.
Is there any way of setting name to be something more meaninful automatically rather than having to write sql to query data dictionary to do this?
Many Thanks

There are no undocumented features in Oracle.
What did the documentation tell, apart from it isn't possible?
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Range interval partitioning with null value

    Hello,
    I have question, how can I create table with partition and after that I will insert null value in the partition key like this kind of
    range interval partitioning with null value.
    I have Oracle 11g.
    Thanks
    Mohammed

    user13777053 wrote:
    Thank you, but my question is about range interval not for range?http://docs.oracle.com/cd/E11882_01/server.112/e25523/partition.htm#VLDBG00220
    A MAXVALUE literal can be defined for the highest partition. MAXVALUE represents a virtual infinite value that sorts higher than any other possible value for the partitioning key, *including the NULL value.*
    So since you're trying to partition by interval (which doesn't support a MAXVALUE clause) you're out of luck.
    There's probably fancy hacks and what not you could try to implement, but i'm not about to recommend any of those here :)
    Cheers,

  • Range interval partitioning

    Hi,
    Using Oracle 11.20.3
    We wish to have a range-hash composite partitioned table, one partition for each month.
    However, want to esnure are always a partition tehrfore would like to use range interval partitioning.
    Have a few questions, if have partition say 201301 to 201312 but get somew rosw which have value in date in June 2014 would it create
    a new partition for each month i.e 201401, 201402 etc or just one for 201406?
    Wanyt esnure system can cope automatically with following scenario
    Daty1 have partitions 201301 to 201312
    Day2 get record for 201406 (June 2014)
    Day 3 get record for 201403 (March 2014)
    We have no control of the range of dates we could get but don't want tpo have to manually create partitions fro all tehse dates in advance - want system to handled it automatically.
    Also can you simply rename the system generated partition names to something more meaningful later.

    >
    Using Oracle 11.20.3
    We wish to have a range-hash composite partitioned table, one partition for each month.
    However, want to esnure are always a partition tehrfore would like to use range interval partitioning.
    Have a few questions, if have partition say 201301 to 201312 but get somew rosw which have value in date in June 2014 would it create
    a new partition for each month i.e 201401, 201402 etc or just one for 201406?
    Wanyt esnure system can cope automatically with following scenario
    Daty1 have partitions 201301 to 201312
    Day2 get record for 201406 (June 2014)
    Day 3 get record for 201403 (March 2014)
    We have no control of the range of dates we could get but don't want tpo have to manually create partitions fro all tehse dates in advance - want system to handled it automatically.
    >
    Do NOT be afraid of breaking Oracle by actually trying things yourself.
    DROP TABLE emp_part
    CREATE TABLE emp_part (empno number(4), ename varchar2(10),
    deptno number(2), created_date DATE default sysdate)
      partition by range (created_date)
         SUBPARTITION BY HASH(deptno) subpartitions 4
    ( partition p_prior_to_2014 values less than (to_date('01-01-2014', 'mm-dd-yyyy')));Add some data for 2014 and see for yourself what happens.
    >
    Also can you simply rename the system generated partition names to something more meaningful later.
    >
    Yes - assuming you mean more meaninful to a human. Oracle doesn't care what the name is.
    And you can just as easily manipulate the partition (delete, insert, drop truncate) regardless of the name since you don't need to use the name to do those things.
    You either know the date for the partition you want to work with or you don't. If you know then just tell Oracle and it will work with the correct partition. If you don't believe me try it with the sample code I gave you. Add some data to get a couple of interval partitions created and then drop one of them using Oracle's extended partition syntax. See this example in the 'Dropping Interval Partitions in the VLDB and Partitioning Guide
    http://docs.oracle.com/cd/B28359_01/server.111/b32024/part_admin.htm#i1007479
    >
    The following example drops the September 2007 interval partition from the sales table. There are only local indexes so no indexes will be invalidated.
    ALTER TABLE sales DROP PARTITION FOR(TO_DATE('01-SEP-2007','dd-MON-yyyy'));
    >
    That code doesn't require the partition name. You just need to specify a date that falls IN the partition that you want to drop. You have to do that whether you know the name of the partition or not. Don't 'gunk up' your system with code to rename things unless there is some real need to.

  • Range - Interval Partition and List Subpartition.

    Hi
    I am trying to create the Range(Interval) Partition with List Sub partition (dynamically). Here the LOCATION_CD List is Dynamic. Basically Location_CD is Country name. e.g USA, IND,GER.....
    Below Works good...
    CREATE TABLE TEMP
    SEQUENCE_ID NUMBER,
    RESERVATION_DATE TIMESTAMP,
    LOCATION_CD VARCHAR2(5)
    PARTITION BY RANGE (RESERVATION_DATE)
    INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
    SUBPARTITION BY LIST(LOCATION_CD)
    SUBPARTITION TEMPLATE
    ( SUBPARTITION CD_01 VALUES ('USA'),
    SUBPARTITION CD_02 VALUES ('IND'),
    SUBPARTITION CD_03 VALUES ('GER')
    PARTITION TEMP values LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY'))
    Today there are 3 Countries but going forward it can be more or less.
    I like the Interval Range Partition concept, where the new partition is automatically gets added.
    But at the same time can the new list sub partition be added ? If this doesn't work...can we have another alternative approach or partition technique ?
    Please suggest.
    Thanks
    Jitesh R.

    Why didn't you just perform two inserts and answer the question yourself?
    orabase> CREATE TABLE T (
      2  SEQUENCE_ID      NUMBER,
      3  RESERVATION_DATE TIMESTAMP,
      4  LOCATION_CD      VARCHAR2(5))
      5  PARTITION BY RANGE (RESERVATION_DATE)
      6  INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
      7  SUBPARTITION BY LIST(LOCATION_CD)
      8  SUBPARTITION TEMPLATE (
      9  SUBPARTITION CD_01 VALUES ('USA'),
    10  SUBPARTITION CD_02 VALUES ('IND'),
    11  SUBPARTITION CD_03 VALUES ('GER')) (
    12  PARTITION root values LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY')));
    Table created.
    orabase> insert into t values (1, TO_DATE('02-JAN-2000'), 'USA');
    1 row created.
    orabase> select partition_name, subpartition_name
      2  from user_tab_subpartitions
      3  where table_name = 'T';
    PARTITION_NAME                 SUBPARTITION_NAME
    ROOT                           ROOT_CD_03
    ROOT                           ROOT_CD_02
    ROOT                           ROOT_CD_01
    SYS_P84                        SYS_SUBP83
    SYS_P84                        SYS_SUBP82
    SYS_P84                        SYS_SUBP81
    6 rows selected.
    orabase>  insert into t values (1, TO_DATE('02-JAN-2000')+400, 'USA');
    1 row created.
    orabase> select partition_name, subpartition_name
      2  from user_tab_subpartitions
      3  where table_name = 'T';
    PARTITION_NAME                 SUBPARTITION_NAME
    SYS_P88                        SYS_SUBP85
    SYS_P88                        SYS_SUBP86
    SYS_P88                        SYS_SUBP87
    SYS_P84                        SYS_SUBP81
    SYS_P84                        SYS_SUBP82
    SYS_P84                        SYS_SUBP83
    ROOT                           ROOT_CD_01
    ROOT                           ROOT_CD_02
    ROOT                           ROOT_CD_03
    9 rows selected.

  • Existing Range partition to Interval Partition

    I have an Range and list partition tables on Oracle 11g with some records and have to move the
    range and List partition tables to interval partitions. I tried for the range partition
    table with following query,
    SQL> alter table F_PTP_PAYMENTS set interval (numtoyminterval(3,'MONTH'));
    alter table F_PTP_PAYMENTS set interval (numtoyminterval(3,'MONTH'))
    ERROR at line 1:
    ORA-14759: SET INTERVAL is not legal on this table.
    it doesnt worked out.
    Can you please help me to create the interval partitions.

    ORA-14759: SET INTERVAL is not legal on this table.
    Cause: ALTER TABLE SET INTERVAL is only legal on a range partitioned table with a single partitioning column. Additionally this table cannot have a maxvalue partition.
    Action: Use SET INTERVAL only on a valid table
    mark answered post as helpful / correct*

  • Alter range partition table to Interval partitioning table.

    Hi DBA's,
    I have a very big range partitioned table.
    Recently we have upgraded our database to 11gR2 which has a feautre called interval partitioning.
    Now i want to modify that existing range partitioned table to Interval Partitioning.
    can we alter the range partitioned table to interval partitioning table?
    I googled for the syntax but i didn't find it, can any one help[ me out on this?
    Thanks.

    If you ignore the "alter session set NLS_CALENDAR=PERSIAN;" during create/alter, everything else seems to work.
    When you set the "alter session..." during inserts, the rows gets inserted into the correct partitions.
    Only thing is when you look at HIGH_VALUE, you need to convert from the default GREGORIAN to PERSIAN.

  • Range partiotion using interval partitioning

    Hi all,
    I am trying to create a partitioned table so that a number (which date converted to number ) partition is created on inserting a new row for release_date column.
    But please note that release_date column is having number data type (as per design) and people want to create an interval based partition on this.
    Any work around for this?
    They want data type NOT to be altered.
    create table product(
    prod_id number,
    prod_code varchar2(3),
    release_date number)
    partition by range(release_date)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
    (partition p0 values less than (20120101))
    Thanks in advance

    >
    I am trying to create a partitioned table so that a number (which date converted to number ) partition is created on inserting a new row for release_date column.
    But please note that release_date column is having number data type (as per design) and people want to create an interval based partition on this.
    >
    You can't use interval partitioning on the NUMBER column but you can add a VIRTUAL column based on it that uses DATE datatype.
    create table product(
    prod_id number,
    prod_code varchar2(3),
    release_date number,
    rel_date DATE as (to_date(to_char(release_date), 'yyyymmdd')) VIRTUAL
    partition by range(rel_date)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
       partition p0 values less than (to_date('20120101', 'yyyymmdd'))
    )The virtual column is a metadata only column (i.e. no data is stored for it).
    NOTE: you will need to modify your queries to use the 'REL_DATE' column in order to get partition pruning:
    insert into product (prod_id, prod_code, release_date) values (1,'abc', 20110502)
    insert into product (prod_id, prod_code, release_date) values (1,'abc', 20120502)
    -- this query does NOT prune
    select * from product where release_date < 20120101
    |   0 | SELECT STATEMENT    |         |     1 |    38 |     4   (0)| 00:00:01 |       |       |
    |   1 |  PARTITION RANGE ALL|         |     1 |    38 |     4   (0)| 00:00:01 |    1 |1048575|
    |*  2 |   TABLE ACCESS FULL | PRODUCT |     1 |    38 |     4   (0)| 00:00:01 |    1 |1048575|
    -- this query DOES prune
    select * from product where rel_date < to_date('20120101', 'yyyymmdd')
    |   0 | SELECT STATEMENT       |         |     1 |    38 |     3   (0)| 00:00:01 |       |       |
    |   1 |  PARTITION RANGE SINGLE|         |     1 |    38 |     3   (0)| 00:00:01 |     1 |     1 |
    |*  2 |   TABLE ACCESS FULL    | PRODUCT |     1 |    38 |     3   (0)| 00:00:01 |     1 |     1 |

  • 11G Interval Partitioning range based on number

    All the Oracle documentation states that interval partitioning can be range partitioned on a column that is NUMBER or DATE datatype, but the examples all show just for a DATE column and for a monthly interval.
    I need an interval by year, where the partition column is NUMBER and contains 4 digit numbers for year like 2010.
    .Does anyone have a working example for creating an interval partitioned table on a NUMBER datatype column?

    Please do not refer people to the old, non-maintained psoug site. I have asked this several times in the past.
    You do people no favor sending them to the old site contains as it contains inaccurate information I am unable to access and fix.
    The new site is www.morganslibrary.org.
    And I am a bit of an expert on the subject ... as I am "Morgan."
    Thank you.

  • Trying to convert Interval Partitioned Table to Range..Exchange Partition..

    Requirement:
    Replace Interval partitioned Table by Range Partitioned Table
    DROP TABLE A;
    CREATE TABLE A
       a              NUMBER,
       CreationDate   DATE
    PARTITION BY RANGE (CreationDate)
       INTERVAL ( NUMTODSINTERVAL (30, 'DAY') )
       (PARTITION P_FIRST
           VALUES LESS THAN (TIMESTAMP ' 2001-01-01 00:00:00'));
    INSERT INTO A
         VALUES (1, SYSDATE);
    INSERT INTO A
         VALUES (1, SYSDATE - 30);
    INSERT INTO A
         VALUES (1, SYSDATE - 60);I need to change this Interval Partitioned Table to a Range Partitioned Table. Can I do it using EXCHANGE PARTITION. As if I use the conventional way of creating another Range Partitioned table and then :
    DROP TABLE A_Range
    CREATE TABLE A_Range
    a NUMBER,
    CreationDate DATE
    PARTITION BY RANGE (CreationDate)
       (partition MAX values less than (MAXVALUE));
    Insert  /*+ append */  into A_Range Select * from A; --This Step takes very very long..Trying to cut it short using Exchange Partition.Problems:
    I can't do
    ALTER TABLE A_Range
      EXCHANGE PARTITION MAX
      WITH TABLE A
      WITHOUT VALIDATION;
    ORA-14095: ALTER TABLE EXCHANGE requires a non-partitioned, non-clustered table
    This is because both the tables are partitioned. So it does not allow me.
    If I do instead :
    create a non partitioned table for exchanging the data through partition.
      Create Table A_Temp as Select * from A;
       ALTER TABLE A_Range
      EXCHANGE PARTITION MAX
      WITH TABLE A_TEMP
      WITHOUT VALIDATION;
      select count(*) from A_Range partition(MAX);
    -Problem is that all the data goes into MAX Partition.
    Even after creating a lot of partitions by Splitting Partitions, still the data is in MAX Partition only.
    So:
    -- Is it that we can't Replace an Interval Partitioned Table by Range Partitioned Table using EXCHANGE PARTITION. i.e. We will have to do Insert into..
    -- We can do it but I am missing something over here.
    -- If all the data is in MAX Partition because of "WITHOUT VALIDATION" , can we make it be redistributed in the right kind of range partitions.

    You will need to pre-create the partitions in a_range, then exchange them one by one from a to a tmp then then to arange. Using your sample (thanks for proviing the code by the way).
    SQL> CREATE TABLE A
      2  (
      3     a              NUMBER,
      4     CreationDate   DATE
      5  )
      6  PARTITION BY RANGE (CreationDate)
      7     INTERVAL ( NUMTODSINTERVAL (30, 'DAY') )
      8     (PARTITION P_FIRST
      9         VALUES LESS THAN (TIMESTAMP ' 2001-01-01 00:00:00'));
    Table created.
    SQL> INSERT INTO A VALUES (1, SYSDATE);
    1 row created.
    SQL> INSERT INTO A VALUES (1, SYSDATE - 30);
    1 row created.
    SQL> INSERT INTO A VALUES (1, SYSDATE - 60);
    1 row created.
    SQL> commit;
    Commit complete.You can find the existing partitions form a using:
    SQL> select table_name, partition_name, high_value
      2  from user_tab_partitions
      3  where table_name = 'A';
    TABLE_NAME PARTITION_NAME HIGH_VALUE
    A          P_FIRST        TO_DATE(' 2001-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
    A          SYS_P44        TO_DATE(' 2013-01-28 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
    A          SYS_P45        TO_DATE(' 2012-12-29 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
    A          SYS_P46        TO_DATE(' 2012-11-29 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAYou can then create table a_range with the apporopriate partitions. Note that you may need to create additional partitions in a_range because interval partitioning does not create partitions that it has no data for, even if that leaves "holes" in the partitioning scheme. So, based on the above:
    SQL> CREATE TABLE A_Range (
      2     a NUMBER,
      3     CreationDate DATE)
      4  PARTITION BY RANGE (CreationDate)
      5     (partition Nov_2012 values less than (to_date('30-nov-2012', 'dd-mon-yyyy')),
      6      partition Dec_2012 values less than (to_date('31-dec-2012', 'dd-mon-yyyy')),
      7      partition Jan_2013 values less than (to_date('31-jan-2013', 'dd-mon-yyyy')),
      8      partition MAX values less than (MAXVALUE));
    Table created.Now, create a plain table to use in the exchanges:
    SQL> CREATE TABLE A_tmp (
      2     a              NUMBER,
      3     CreationDate   DATE);
    Table created.and exchange all of the partitions:
    SQL> ALTER TABLE A
      2    EXCHANGE PARTITION sys_p44
      3    WITH TABLE A_tmp;
    Table altered.
    SQL> ALTER TABLE A_Range
      2    EXCHANGE PARTITION jan_2013
      3    WITH TABLE A_tmp;
    Table altered.
    SQL> ALTER TABLE A
      2    EXCHANGE PARTITION sys_p45
      3    WITH TABLE A_tmp;
    Table altered.
    SQL> ALTER TABLE A_Range
      2    EXCHANGE PARTITION dec_2012
      3    WITH TABLE A_tmp;
    Table altered.
    SQL> ALTER TABLE A
      2    EXCHANGE PARTITION sys_p46
      3    WITH TABLE A_tmp;
    Table altered.
    SQL> ALTER TABLE A_Range
      2    EXCHANGE PARTITION nov_2012
      3    WITH TABLE A_tmp;
    Table altered.
    SQL> select * from a;
    no rows selected
    SQL> select * from a_range;
             A CREATIOND
             1 23-NOV-12
             1 23-DEC-12
             1 22-JAN-13John

  • 11gr1 interval partition issues

    1st problem.
    How to delete the last non interval partition?
    When I try it says it is the last non interval..
    2nd
    How to determine which partitions have the interval applied to them?
    Where is the metadata for that? I am unable to find it.
    3rd
    Is it possible to alter a partition to a interval or non-interval partition type?
    All help is appreciated.
    Thanks,
    Steven
    Edited by: user12067909 on May 19, 2010 12:34 PM

    user12067909 wrote:
    Again HIGH_VALUE appears to have no involvement with intervals in 11GR1.This has nothing to do with HIGH_VALUE. Forget agout interval partitioning for a moment. Oracle does not allow partitioned tables that currently have no partitions. Regardless what type of partitioning you are using, table must have at least one partition. Therefore, you can't drop past partition. Now back to interval partitions. This type of partitioning has "named" partitions (like p0 in your case) and "unnamed" partitions dynamically created when you insert data. These "unnamed" partitions are not part of table definition:
    SQL> create table t1p
      2  ( a    number,
      3    sdate date
      4  )
      5  partition by range(sdate)
      6  interval (numtodsinterval(1,'day'))
      7  (partition p0 values less than
      8   (to_date('12-apr-2009','dd-mon-yyyy'))
      9  )
    10  /
    Table created.
    SQL> insert into t1p ( a,sdate )
      2  values ( 1,to_date('20100101','yyyymmdd'));
    1 row created.
    SQL> insert into t1p ( a,sdate )
      2  values ( 1,to_date('20090101','yyyymmdd'));
    1 row created.
    SQL> commit
      2  /
    Commit complete.
    SQL> 
    SQL> select partition_name from user_tab_partitions where table_name = 'T1P'
      2  /
    PARTITION_NAME
    P0
    SYS_P46
    SQL> set long 10000
    SQL> select dbms_metadata.get_ddl('TABLE','T1P') from dual
      2  /
    DBMS_METADATA.GET_DDL('TABLE','T1P')
      CREATE TABLE "SCOTT"."T1P"
       (    "A" NUMBER,
            "SDATE" DATE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      PARTITION BY RANGE ("SDATE") INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (PARTITION "P0"  VALUES LESS THAN (TO_DATE(' 2009-04-12 00:00:00', 'SYYYY-MM-DD
    HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    DBMS_METADATA.GET_DDL('TABLE','T1P')
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" NOCOMPRESS )
    SQL> So in the sense that dynamically created partitions do not count, error message is misleading. There would not be any error if, for example, there would be two "named" partitions:
    SQL> create table t1p
      2  ( a    number,
      3    sdate date
      4  )
      5  partition by range(sdate)
      6  interval (numtodsinterval(1,'day'))
      7  (partition p0 values less than
      8   (to_date('12-apr-2009','dd-mon-yyyy')),
      9   partition p1 values less than
    10   (to_date('12-may-2009','dd-mon-yyyy'))
    11  )
    12  /
    Table created.
    SQL> alter table  t1p drop partition p0
      2  /
    Table altered.
    SQL> But now, as soon as we are down to one "named"partition:
    SQL> alter table  t1p drop partition p1
      2  /
    alter table  t1p drop partition p1
    ERROR at line 1:
    ORA-14758: Last partition in the range section cannot be dropped
    SQL> SY.

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

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

  • Droping Partition Dynamically in Interval Partitioning

    Hi All,
    I have created an Interval Partition Table as show below, Is their any way, i can drop the partition dynamically when i truncate the table as oracle creates them with system generated name? Instead Alter table drop partition !
    Create Table Script :
    CREATE TABLE TBL_EMP_SALES
    EMP_ID NUMBER(38),
    EMPNAME VARCHAR2(9),
    EMP_SALES_AMOUNT NUMBER(5),
    EMP_SALES_DATE DATE,
    CONSTRAINT PK_EMP_03 PRIMARY KEY (EMP_ID) USING INDEX TABLESPACE EMP_TABLESPACE
    ) NOLOGGING PARALLEL 4 TABLESPACE EMP_TABLESPACE
    PARTITION BY RANGE(EMP_SALES_DATE)
    INTERVAL (numtodsinterval(1,'day'))
    STORE IN (EMP_TABLESPACE)
    PARTITION P0 VALUES LESS THAN (to_date('23-AUG-2012','DD-MON-YYYY')) NOLOGGING
    Insert Script :
    INSERT INTO TBL_EMP_SALES VALUES (1001,'A',50,SYSDATE);
    INSERT INTO TBL_EMP_SALES VALUES (1002,'B',100,SYSDATE+1);
    INSERT INTO TBL_EMP_SALES VALUES (1003,'C',80,SYSDATE+2);
    INSERT INTO TBL_EMP_SALES VALUES (1004,'D',250,SYSDATE+3);
    INSERT INTO TBL_EMP_SALES VALUES (1005,'E',50,SYSDATE+4);
    INSERT INTO TBL_EMP_SALES VALUES (1006,'F',50,SYSDATE+5);
    INSERT INTO TBL_EMP_SALES VALUES (1007,'G',340,SYSDATE+6);
    INSERT INTO TBL_EMP_SALES VALUES (1008,'H',120,SYSDATE+7);
    COMMIT;
    Partitions Created :
    select segment_name,partition_name,bytes from user_segments where segment_name = 'TBL_EMP_SALES';
    segment_name partition_name bytes
    TBL_EMP_SALES     P0     8388608
    TBL_EMP_SALES     SYS_P602     8388608
    TBL_EMP_SALES     SYS_P603     8388608
    TBL_EMP_SALES     SYS_P604     8388608
    TBL_EMP_SALES     SYS_P605     8388608
    TBL_EMP_SALES     SYS_P606     8388608
    TBL_EMP_SALES     SYS_P607     8388608
    TBL_EMP_SALES     SYS_P608     8388608
    Thanks,
    Varun
    Edited by: 900575 on Aug 22, 2012 1:18 AM

    Hi Kev82Fr,
    Thanks for the useful post, I have tried your after trigger concept it works well and i have modified the code as below. Is their any other way where i can drop all the partition in the table in one shot ?
    --------------------------------------Drop Partition Procedure--------------------------------
    create or replace
    PROCEDURE USP_PARTITION_DROP_TEST
    AS
    lv_cmd VARCHAR2(2000);
    CURSOR parition_names IS
    SELECT partition_name FROM user_segments WHERE segment_name = 'TBL_EMP_SALES';
    parition_record parition_names%ROWTYPE;
    BEGIN
    OPEN parition_names;
    LOOP
    FETCH parition_names INTO parition_record;
    EXIT WHEN parition_names%NOTFOUND;
    SELECT 'ALTER TABLE TBL_EMP_SALES DROP PARTITION '||parition_record INTO lv_cmd FROM DUAL;
    EXECUTE IMMEDIATE lv_cmd;
    END LOOP;
    CLOSE parition_names;
    END USP_PARTITION_DROP_TEST;
    ---------------- After Truncate Trigger-----------------------------------
    CREATE OR REPLACE TRIGGER TRG_PARTITION_DROP
    after truncate on <SCHEMA NAME>.SCHEMA
    BEGIN
    USP_PARTITION_DROP_TEST();
    END;
    Thanks,
    Varun

  • 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

Maybe you are looking for

  • KM2M serial port not working in Linux

    I noticed a few Linux postings so I thought I'd give this a shot. I'm running Fedora Core and for some strange reason I can't seem to send any communications out to the ttyS0 (COM 1) or ttyS1 (COM 2) ports. Does anyone have any suggestions on making

  • F.13 Consolidated companies " " and " " are different

    Hello gurus, I have seen many threads on this, but I have yet to find one to answer my particular issue.  When we run F.13, we are getting the error message stated in the subject line above.  We are using two document types here: WE:  Goods receipt R

  • Where is the "Recently Added" section? And how do I transfer music to my iPhone now?

    I just downloaded the newest version of iTunes, and what do you know, I hate it. I literally can't find ANYTHING that I need, and just end up getting ******. Can someone help me find the "Recently Added" in the new version of iTunes, and show me how

  • What are infotypes in ABAP HR

    Hi all, what are infotypes in ABAP HR... and also can i get a brief idea about reporting in ABAP HR Thanks in advance cheers, Raghavesh

  • Installing essbase 7.1 and its getting error license file.

    Hi, I have license file in my folder and I wish to try to load Essbase 7.1 to my desktop PC windows based. I installed client and when I try to Install Essbase server, it asked license file. I have mentioned the file which it have loaded sucessfully