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.

Similar Messages

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

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

  • Primary Key Causing Problem in Interval Partition Exchange

    DB : 11.2.0.2
    OS : AIX 6.1
    I am getting the problem while exchanging data with interval partitioned table. I have a interval partitioned table and a normal staging table having data to be uploaded.
    Following are the steps i am doing.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4))
                    PARTITION BY RANGE (ADMISSION_DATE)
                    INTERVAL (NUMTOYMINTERVAL(3,'MONTH'))
                    ( PARTITION QUAT_1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','DD-MON-YYYY')),
                     PARTITION QUAT_2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','DD-MON-YYYY')),
                     PARTITION QUAT_3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','DD-MON-YYYY')),
                     PARTITION QUAT_4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','DD-MON-YYYY')));
    Table created.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD ADD CONSTRAINT IDX_DEMO_ROLL PRIMARY KEY (ROLL_NUM);
    Table altered.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
           PARTITION_POSITION,
              TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (10,1,'12-MAR-2012',1000,90);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (11,5,'01-JUN-2012',5000,80);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (12,9,'12-SEP-2012',4000,20);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (13,7,'29-DEC-2012',7000,10);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (14,8,'21-JAN-2013',2000,50); ---- This row will create a new interval partition in table.
    1 row created.
    SQL> commit;
    SQL> SELECT TABLE_OWNER,
            TABLE_NAME,
            COMPOSITE,
            PARTITION_NAME,
            PARTITION_POSITION,
            TABLESPACE_NAME,
            LAST_ANALYZED
      FROM DBA_TAB_PARTITIONS
         WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS  
    SYS_P98 partition is added to table automatically.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD_Y (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4));
    Table created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD_Y VALUES (30,3,'21-MAY-2013',2000,12);
    1 row created.
    SQL> commit;
    Commit complete.
    Since, i need a partition in DEMO_INTERVAL_DATA_LOAD table, which can be used in partition exchange, so i create a new partition as below:
    SQL> LOCK TABLE DEMO_INTERVAL_DATA_LOAD PARTITION FOR (TO_DATE('01-APR-2013','DD-MON-YYYY')) IN SHARE MODE;
    Table(s) Locked.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
               PARTITION_POSITION,
               TABLESPACE_NAME,
               LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P102                                        6 USERS
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    ERROR at line 1:
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITIONNow, if i disable/drop the primary key constraint, it works without any problem.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD disable constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD drop constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    Table altered.
    SQL> select * from DEMO_INTERVAL_DATA_LOAD partition (SYS_P102);
      ROLL_NUM   CLASS_ID ADMISSION  TOTAL_FEE  COURSE_ID
            30          3 21-MAY-13       2000         12
    SQL> select * from DEMO_INTERVAL_DATA_LOAD_Y;
    no rows selectedPlease suggest.

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

  • 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 search data dictionary for interval partitions?

    Oracle 11.2.0.3
    When I query DBA_PART_TABLES.PARTITIONING_TYPE it says 'range'. I want to be able to differential an interval from other range based partitions in the data dictionary?
    used this example. shows 'range'
    http://www.rittmanmead.com/2008/09/investigating-oracle-11g-interval-partitioning/
    Oracle Docs list 'SYSTEM' as a partitioning_type which I thought would be intervals.
    ALL_PART_TABLES
    [code]
      1   CREATE TABLE interval_sales
      2          ( prod_id        NUMBER(6)
      3          , cust_id        NUMBER
      4          , time_id        DATE
      5          , channel_id     CHAR(1)
      6          , promo_id       NUMBER(6)
      7          , quantity_sold  NUMBER(3)
      8          , amount_sold    NUMBER(10,2)
      9          )
    10       PARTITION BY RANGE (time_id)
    11       INTERVAL(NUMTOYMINTERVAL(1, 'MONTH'))
    12         ( PARTITION p0 VALUES LESS THAN (TO_DATE('1-1-2005', 'DD-MM-YYYY')),
    13           PARTITION p1 VALUES LESS THAN (TO_DATE('1-1-2006', 'DD-MM-YYYY')),
    14           PARTITION p2 VALUES LESS THAN (TO_DATE('1-7-2006', 'DD-MM-YYYY')),
    15*          PARTITION p3 VALUES LESS THAN (TO_DATE('1-1-2007', 'DD-MM-YYYY')) )
    SQL>/
    Table created.
    Elapsed: 00:00:00.01
    SQL> select partitioning_type from user_part_tables where table_name = 'INTERVAL_SALES';
    PARTITION
    RANGE
    [/code]

    CREATE TABLE junk1
       ( id         NUMBER )
       PARTITION BY RANGE (id)
       INTERVAL(5)
         ( PARTITION p0 VALUES LESS THAN (5),
           PARTITION p1 VALUES LESS THAN (10),
           PARTITION p2 VALUES LESS THAN (15),
           PARTITION p3 VALUES LESS THAN (20) )
    CREATE TABLE junk2
       ( id         NUMBER )
       PARTITION BY RANGE (id)
         ( PARTITION p0 VALUES LESS THAN (5),
           PARTITION p1 VALUES LESS THAN (10),
           PARTITION p2 VALUES LESS THAN (15),
           PARTITION p3 VALUES LESS THAN (20) )
    select owner, table_name, partitioning_type, interval
      from dba_part_tables
    where table_name in ('JUNK1', 'JUNK2')
    OWNER                          TABLE_NAME                     PARTITIONING_TYPE INTERVAL           
    GREGS                          JUNK1                          RANGE             5                  
    GREGS                          JUNK2                          RANGE                 
    2 rows selected.

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

  • Interval Partition naming Issue (Oracle 11g R2 )

    I need help on identifying latest partition:
    I am using Interval Partition for my table,which creates partition every month end based on inserted data.
    When oracle creates partition assigning its own name but users have automated reports using partition names like Table_name_YYYYMM.
    I tested following ways to identify partition then renamed,worked fine but in long run do i get any problems ?
    or any other way to identify the latest partition ?
    1)Using max partition position :
    select partition_name from dba_tab_partitions a where partition_position = (select max(partition_position)
    from user_tab_partitions b where a.table_name=b.table_name
    and b.table_name = 'INTRVL_PARTITION');
    2)Using Sub Object max creation date :
    SELECT SUBOBJECT_NAME FROM dba_objects
    WHERE OBJECT_TYPE='TABLE PARTITION'
    AND OWNER='ABCD'
    AND OBJECT_NAME='INTRVL_PARTITION'
    AND CREATED=(SELECt MAX(CREATED) FROM DBA_OBJECTS
    WHERE OBJECT_TYPE='TABLE PARTITION'
    AND OWNER='ABCD'
    AND OBJECT_NAME='INTRVL_PARTITION');
    Thanks in advance .
    Edited by: user607128 on Mar 2, 2012 7:09 AM

    Your initial question said you were already using interval partitioning.
    >
    I am using Interval Partition for my table
    now users asking to convert Range to Interval Partition and keeping existing partitions same name.
    >
    So is your issue that you want to use interval partitining for a table now is now using range partitioning? Why are your users driving this change? That should be a decision made by the DBA and technical management since the difference is mainly on of management.
    Though there is one BIG difference that is data related. With interval partitioning if data (even erroneous data) is inserted for a partition that does not exist Oracle will create one. So if you have an insert statement that inserts 12 records for the year '2038' you will get 12 new partitions even though the data may be bogus.
    Now your management problem is detecting the problem, deleting the data (or fixing the date to move it to the right partition) and then dropping the partitions and storage.
    With 'interval' partitioning you had better be absolutely sure your data is clean in terms of the partitioning key values.
    That said, you can use table redefinition or just create a new interval partitioned table and do partition exchanges with the existing partitions to move the data.

  • 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

  • Oracle 11g interval partitioning - meaningfull partition-names

    Hello,
    On 11g, when creating interval partitions, the partitions get automatically created just fine. Very nice feature. But is it possible to supply meaningfull names to them?
    Now they get names SYS_nnn, but I would like to name them for instance SALES_2007.
    Here is one example on how to use interval partitioning:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b32024/part_admin.htm#BAJHFFBE
    And here is the syntax guide:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_7002.htm#sthref7644
    I don't see how to accomplish meaningfull names (automatically!). Do you?

    No I don't think it is possible. This is what is written in Oracle documentation..
    http://download.oracle.com/docs/cd/B28359_01/server.111/b32024/partition.htm#CACHFHHF
    >
    The range partitioning key value determines the high value of the range partitions, which is called the transition point, and the database creates interval partitions for data beyond that transition point.
    >

  • 11g interval partitioning and global index maintenance

    hi gurus,
    in 11g interval partitioning system can automatically manage the creation of new partitions based on data.
    in this case do we need to manage global indexes?
    in earlier versions, we have to update global indexes whenever there is a partition maintenance operation.
    please suggest.
    thanks,
    charles

    user570138 wrote:
    in earlier versions, we have to update global indexes whenever there is a partition maintenance operation.In 10gR2 you don't need to update/rebuild a global index after adding a partition to the base table.
    So it should be the same when using interval partitioning.
    Regards
    Maurice

  • 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

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

Maybe you are looking for

  • Word Wrap

    Hi Guys I neec to use word wrap in JTable cells but can't figure-out how to do it; can any of you help me? Many thanks Patrick

  • How to get the Group ID for the groups in the address book

    There are 2 AddressBooks 'ABook1' and 'ABook2'. Both the AddressBooks have Group named 'Group1' and AddressBook 'ABook2' had a another group 'Group2' which has 'Group1' (from 'ABook1') as one of the members. How can i get to know that which Addressbo

  • Is there a way to view embedded files in a Word doc that you have PDF'd?

    We embed as objects different types of files (i.e, pdf, excel, etc.) into our word documents.  When those documents are PDF'd, you cannot open the files as they become pictures.  Is there anyway I can have the embedded files open in PDF as they do in

  • T410 problem about graphics card

    my machine:i5-540M(2.53GHz), 4GB RAM, 320GB 7200rpm HD, 14.1in 1440x900 LCD, 256MB nVIDIA Quadro NVS 3100M. problem: graphics card is very hot. I detect the temperature, It is 55°C(131℉) when start OS and soon go up to more than 100°C(212℉) even thou

  • Call to a ext that is forwared

    Hi all, If I use the forward all calls option, I only can call to this line with the destination ext. I don't use ipma... so... how I can call with othe ext to the forwared line? Thanks