Partitioning of tables  in oracle 1og

I want to do the partitioning of tables due to increasing their size.Can anyone guide me cn I do it? Is it possible to do it?If possible then how can i do it.plz guide mme with al qeuries.
thanks.

While it is certainly possible to partition tables (assuming you have the enterprise edition and the partitioning option), that is not something that you would generally want to take a cookbook approach to. Partitioning tables incorrectly is a great way to slow down the system and make it oodles more difficult to support. Partitioning requires a fair amount of architecture and design to get right, and that, in turn, requires that you understand how partitioning works, how your application works, and what you want partitioning to do to change the way your application works.
Justin

Similar Messages

  • Partitioning of table in oracle 10g - How to Add

    Hello Friends ,
    Hope you are all fine and doing great.
    By the way - I have a quick question on oracle 10g Partitioning of tables...
    I have a table with partition as stated below ..
    CREATE TABLE X_ACC_ASSETS_GPC_AGG
    X_ACC_ASSETS_GPC_AGG_RK NUMBER(10) NOT NULL,
    X_AS_OF_DT DATE NOT NULL,
    ACCOUNT_RK NUMBER(10) NOT NULL,
    X_UNIV_ACCOUNT_ID NUMBER(10),
    ACCOUNT_ID VARCHAR2(10 BYTE),
    X_ASSET_TYPE_CD VARCHAR2(6 BYTE),
    X_AUC_AMT NUMBER(18,5),
    X_FIRM_AMT NUMBER(18,5),
    X_ADJ_SRCE_AMT NUMBER(18,5),
    PROCESSED_DTTM DATE
    )PARTITION BY RANGE (X_AS_OF_DT)
    PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P201112
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION PMAX
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    )NOPARALLEL;
    My question is :
    1) How to add a partition say P201201 ..
    Since I have already stated PARTITION PMAX can I still add partition?
    2) Can I add partition even though the table has data ?
    ==========================
    I tried to add partition ..say
    ALTER TABLE X_ACC ADD PARTITION P201201 VALUES LESS THAN
    (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    but getting the error ..
    "partition bound must collate higher than that of the last partition"
    Thanks/kumar

    You have partitions
    200712
    200812
    200912
    201012
    201112
    PMAX.
    so your condition for partition p201112 is '201012-01-01' to '201112-01-01' i.e the values between these two dates will be in partition p201112. and then everything else will be in PMAX. So now you are splitting your pmax.
    alter table X_acc split partition pmax at ( to_date('2012-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') )
    into (partition p201201, partition pmax); The condition you have to change. I just showed as an example. It could be the date range between two dates or it could be greater than a date value. It is upto how you want this new partition.
    how to add partition between two partition
    Edited by: pransuj on Mar 25, 2011 11:13 AM
    Edited by: pransuj on Mar 25, 2011 11:14 AM

  • Error in creating partition table in oracle spatial by ankur

    Hi,
    Am working on Oracle 10.2.0.3
    Am not able to create partition table in Oracle
    i have all the required columns in node and edge table ......the moment i try to create partition table using exec sdo_router_partition.partion_router i get the following error:
    ERROR at line 1:
    ORA-00947: not enough values
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 1510
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 661
    ORA-06512: at line 1
    Can someone help ??

    hey i have found the solution myself :)

  • Problem while partitioning The Table

    create table Employee ( empno number(3), name varchar2(10), deptno number(4))
    partition by range(deptno)
    (partition p1 values less than(11),
    partition p2 values less than(21),
    partition p3 values less than(31));
    create table Employee (
    ERROR at line 1:
    ORA-00439: feature not enabled: Partitioning
    Please help me for solving this problem and send me the details I need to partition my table.
    Thanks in advance.
    w.regards
    R.Satish

    Looks like you don't have partition license or don't have a complete install of Oracle version 8.0.5. The best way to check is do a sqlplus user/passwd and look for a message that said "Production with the Partitioning and objects options" to appear before the SQL> prompt. Hope this helps....
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by rkumar:
    create table Employee ( empno number(3), name varchar2(10), deptno number(4))
    partition by range(deptno)
    (partition p1 values less than(11),
    partition p2 values less than(21),
    partition p3 values less than(31));
    create table Employee (
    ERROR at line 1:
    ORA-00439: feature not enabled: Partitioning
    Please help me for solving this problem and send me the details I need to partition my table.
    Thanks in advance.
    w.regards
    R.Satish <HR></BLOCKQUOTE>
    null

  • Limit on the number of partitions a table can have

    Hi,
    It's been quite some time I'm thinking of a simple and the best solution to a performance issue in my application. Benefiting out of partitioning the table seems a simplest approach; it involves very minimal changes to my application code and in addition, it keeps the overall application logic 100% intact. However, at times, the number of partitions required can grow to as large as 500 thousand. I know of another application implementing as many as 50 thousand partitions for one of its tables. I'm wondering if Oracle recommends or poses any limit to a number of partitions the table can have. How does that limit, if it exists, vary if each of my table partition holds only a small amount of data; say, not more than 2 thousand records each of 1 KB size. What are the important considerations that one needs to keep in mind while creating the huge number of partitions for a table?
    Any inputs on this would be a great help.
    Thanks,
    Aniruddh
    ps: Consider Oracle releases 10g onwards.
    Edited by: Aniruddh on Dec 30, 2009 9:46 AM
    Edited by: Aniruddh on Dec 30, 2009 9:50 AM

    Aniruddh,
    >
    What are the important considerations that one needs to keep in mind while creating the huge number of partitions for a table?
    >
    I doubt if you are using partitioning for the right causes. Please explain how is your data structured and why you need to create so many partitions..?
    when creating partition, you need to consider..
    a) why you need to partition?
    b) how is your data structured
    c) how your data is indexed.
    d) What kind of queries would you firing on this table to get the data. Will they use the partition key ?
    Thanks,
    Rajesh.
    Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.
    Always try to provide create table and insert statements to help the forum members help you better.

  • Partioned tables in Oracle 10

    I would like to get some feedback and guidance on whether there are any advantages to the implementing partitioning on very large tables within Oracle for the purpose of webIntelligence reporting in a Business Objects XI R2 with SP5 running on AIX 5.3.7 environment. Has this been done by any clients and was reporting performance improved.

    No reply was received from this post however on site we experimented with this and found it to be enormosusly beneficial fro system performance.

  • Partitioning A table on a data column

    Hi,
    My requirement is to partition a table using a column with DATE datatype.
    Example:
    CREATE TABLE parttab
    STATUS CHAR(1) DEFAULT 'a' NOT NULL,
    UPDATER VARCHAR2(55) NOT NULL,
    UPDTIME DATE DEFAULT SYSDATE NOT NULL
    TABLESPACE part_tbs
    Now i want to RANGE partition the above table on the "UPDTIME" column, so that it will look like:
    Partition Value from Value till
    P1 01-Jan 31-Mar
    P2 01-Apr 30-Jun
    P3 01-Jul 30-Sep
    P4 MAXVALUE
    I tried using the below syntax, but failed with error.
    CREATE TABLE parttab
    STATUS CHAR(1) DEFAULT 'a' NOT NULL,
    UPDATER VARCHAR2(55) NOT NULL,
    UPDTIME DATE DEFAULT SYSDATE NOT NULL
    TABLESPACE part_tbs
    LOGGING
    PARTITION BY RANGE (UPDTIME)
    PARTITION P1 VALUES LESS THAN (to_date('04','MM')) LOGGING COMPRESS TABLESPACE part_tbs_P1,
    PARTITION P2 VALUES LESS THAN (to_date('07','DD-MM')) LOGGING COMPRESS TABLESPACE part_tbs_P2,
    PARTITION P3 VALUES LESS THAN (to_date('10','DD-MM')) LOGGING COMPRESS TABLESPACE part_tbs_P3,
    PARTITION P4 VALUES LESS THAN (MAXVALUE) LOGGING COMPRESS TABLESPACE part_tbs_P4
    COMPRESS
    NOCACHE
    PARALLEL ( DEGREE 2 INSTANCES Default )
    ROWDEPENDENCIES
    NOMONITORING
    ENABLE ROW MOVEMENT;
    Please suggest.
    Thanks in advance for the suggestions.

    what is the error message and your Oracle version? this sample may assist I guess -
    CREATE TABLE range_part (
    prof_history_id NUMBER(10),
    person_id       NUMBER(10) NOT NULL,
    organization_id NUMBER(10) NOT NULL,
    record_date     DATE NOT NULL,
    ph_comments     VARCHAR2(200))
    PARTITION BY RANGE (record_date) (
    PARTITION yr0 VALUES LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY'))
    TABLESPACE part1,
    PARTITION yr1 VALUES LESS THAN (TO_DATE('01-JAN-2001','DD-MON-YYYY'))
    TABLESPACE part2,
    PARTITION yr2 VALUES LESS THAN (TO_DATE('01-JAN-2002','DD-MON-YYYY'))
    TABLESPACE part3,
    PARTITION yr9 VALUES LESS THAN (MAXVALUE) TABLESPACE part4);for more examples you may visit - http://psoug.org/reference/partitions.html

  • Partitioning large table

    I'm in need of some expert advice on how best to partition the following table in Oracle 9i. It's expected to hold billions of records. This table is expected to receive 10,000,000 new records every hour or so.
    I've tried a composite range-hash partitioning scheme, however it does not appear to be improving the speed of INSERTs. I've created the tablespaces named "part0" through "part9", which all happen to be on the same disk. I realize that optimally these would be on separate disks, however I expected to see a larger improvement over the same table without partitions which doesn't appear to be happening. Here's it's current definition:
    CREATE TABLE sp_device_usage
    (id NUMBER(15) NOT NULL,
    device_id NUMBER(9) NOT NULL,
    datastream_id NUMBER(9) NOT NULL,
    timestamp NUMBER(10) NOT NULL,
    usage_counter NUMBER(15) NOT NULL,
    CONSTRAINT sp_device_usage_pk PRIMARY KEY (id) USING INDEX TABLESPACE cni_index,
    CONSTRAINT sp_device_usage_fk1 FOREIGN KEY (device_id) REFERENCES encore_device,
    CONSTRAINT sp_device_usage_fk2 FOREIGN KEY (datastream_id) REFERENCES sp_datastream
    PARTITION BY RANGE (timestamp)
    SUBPARTITION BY HASH (device_id) SUBPARTITIONS 10 (
    PARTITION sp_device_usage_ptn1 VALUES LESS THAN (100000) TABLESPACE part0,
    PARTITION sp_device_usage_ptn2 VALUES LESS THAN (200000) TABLESPACE part1,
    PARTITION sp_device_usage_ptn3 VALUES LESS THAN (300000) TABLESPACE part2,
    PARTITION sp_device_usage_ptn4 VALUES LESS THAN (400000) TABLESPACE part3,
    PARTITION sp_device_usage_ptn5 VALUES LESS THAN (500000) TABLESPACE part4,
    PARTITION sp_device_usage_ptn6 VALUES LESS THAN (600000) TABLESPACE part5,
    PARTITION sp_device_usage_ptn7 VALUES LESS THAN (700000) TABLESPACE part6,
    PARTITION sp_device_usage_ptn8 VALUES LESS THAN (800000) TABLESPACE part7,
    PARTITION sp_device_usage_ptn9 VALUES LESS THAN (900000) TABLESPACE part8,
    PARTITION sp_device_usage_ptn10 VALUES LESS THAN (maxvalue) TABLESPACE part9
    CREATE INDEX sp_device_usage_idx1 ON
    sp_device_usage(device_id) TABLESPACE cni_index
    CREATE INDEX sp_device_usage_idx2 ON
    sp_device_usage(datastream_id) TABLESPACE cni_index
    CREATE SEQUENCE sp_device_usage_seq START WITH 1000 INCREMENT BY 1 MINVALUE 1 NOCACHE NOCYCLE NOORDER;

    INSERT operations into a partitioned table won't necessarily be any faster than INSERT operations into a non-partitioned table. For partitioned tables, Oracle has to determine which partition to insert each record into, which is an extra step in the partitioned universe. Since you will, for the most part, be inserting into the same partition, you're basically doing the normal table insert with additional partition key checking overhead. Partitioning is designed to speed the retrieval of and, to a lesser extent, update operations on data as well as to improve managability.
    Justin Cave <[email protected]>
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Partitioning Fact Table

    Hi
    In our data warehouse we have a Fact table which has grown quite a large in size around 17 million records. We have been pondering on the options to partition this table.
    Unfortunately this fact table does not have any date columns , all columns are surrogate keys of dimensions, even for time dimensions. My idea is to partition by range by manually specifying the surrogate key ranges of time dimension. Is that the way one proced with?
    Other option is to, add a new column to the Fact Table and populate with the corresponding "ddmmyyyy" in number format and use that one to partition the table. If I go with this approach, if in my reports / queries if I use the dimension key to join between the Fact and Dimension, will oracle still identify which partition to look for? Or do I MUST use the partitioned column in the queries for partition pruning to be effective.
    Any thoughts would be useful.
    Regards
    Mahesh

    if in my reports / queries if I use the dimension key to join between the Fact and Dimension, will oracle still identify which partition to look for? No the oracle will not use the Partition Prunning in this case.
    Or do I MUST use the partitioned column in the queries for partition pruning to be effective.yes , you need to use the partitioned column for partition pruning to be effective.
    Cheers
    Nawneet

  • Partition of table in real life

    Hi all
    i have read about partition of table.
    but i have lot of question in this topic.
    1.which one is better
    range partiting
    hash "
    list "
    composite "
    2.how we can use partition in select statment
    when we don't know about the partition values.
    suppose partition acc to month in table
    and user enter his rollno to see its details then
    how we can give details to user acc to his rollno
    plz give e.g in which partiting is use
    3.partition is userful in oltp system or both (oltp+dss)
    4.partition gives benefit for report creation or not.
    thanks all
    kuljeet pal singh

    1) If one partitioning method were better, Oracle wouldn't have all three options. Each type of partitioning is appropriate in some instances and inappropriate in others.
    2) I'm really not sure what you're asking here. Can you rephrase the question? Also, can you explain the abbreviations "acc" and "rollno"?
    3) Partitioning can be useful in all types of systems. Different types of systems, though, tend to be interested in different partitioning benefits. Data warehouses tend to look at partitioning as much for the managability benefits (decreasing backup times, simplifying maintenance tasks, etc) as for the performance benefits. OLTP systems are less interested in the managability benefits.
    4) Partitioning may or may not speed up report creation. It depends upon the partitioning method, the data distribution, the access patterns of the report, and a number of other variables.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • How i can change tablespace of a table in oracle 8.04

    Dear I want to move tablespace of a table in oracle 8.04 version but it is not working my statement is
    ALTER TABLE ACCOUNTING_ENTRY MOVE TABLESPACE EDI_TSPACE;
    and got the following error message:
    ORA-14004: missing PARTITION keyword
    how i can change tablespace of a table

    Hi,
    It seems that the move tablespace feature is available on 8.1 or higher versions of Oracle. In your case you can try one of the foll....
    Option 1:
    Step 1:CREATE TABLE T1
    TABLESPACE NEWTBS
    AS(SELECT * FROM T);
    Step 2: Rename or Drop the old table.
    Step 3: Rename the new table to the old table name.
    Option 2:
    Step 1: Export the old table.
    Step 2: Rename or Drop the old table.
    Step 3: Create the table in the new tablespace. You may use the INDEXFILE from the imp command here.
    Step 4: Import the old table and use IGNORE=Y
    Reply back if you need assistance on syntax.
    Regards.

  • Recreating SQL Server Tables on Oracle

    Hello,
    I need to recreate several SQL Server tables in Oracle and am trying to figure out if there is an easier way to do it other than manually recreating them.
    I have the SQL Server table scripts, and I have data load xls files that also contain the column names. I use TOAD for Oracle to do my database management, but there is currently no way to autmoatically create a table based on an external file.
    Does anyone have any suggestions?
    Thanks,
    Christine

    Manually re-creating these SQL Server tables for Oracle is exactly the right thing to do.
    SQL Server != Oracle
    In other words, there are numerous differences. You need to look at each table and decide on the type of table (hash table, index organised table, partitioned tables), whether to cluster tables, the types of indexes to use, the data types for the columns to use (Oracle does not have boolean or auto incrementing data types). Oracle supports LONG, RAW, CLOB and BLOB for dealing with different types of binary and large data structures. LONG for example should not be used anymore. There are also specialised data types like BFILE. One can also define your own SQL data types.
    You will only be doing yourself a favour, and the final database application, by going through the learning curve and manually converting each and every table. And no, it is not a huge task either. It sounds a lot more daunting that what it really is.

  • Partition a table

    Hi,
    i should want to know what are the benefit to partition a table, because I follow the step on:
    http://docs.oracle.com/cd/B19306_01/server.102/b14231/tables.htm#i1006754
    the example 1.
    but i cannot demostrate some really benefit.
    For example:
    I have a table AVAN with some index, after that i made AVAN partitioned with the same index, How i can demostrate that after partioned the query executed on partioned table is better?
    If there is a solution of course.
    thanks
    Francesco

    Hi, I've runned the explain plan on a partitioned table and on a non-partitioned table (both table contain the same data).
    The table partioned has only an LOCAL index more, than do not have a partitioned table:
    For the table partioned:
    SQL> EXPLAIN PLAN SET STATEMENT_ID='PART'
      2  FOR
      3  select * from EVENTI_PM e where e.key_id_evento='50000034' and dt_inserimento = (select min(dt_inserimento) from eventi_pm e2
    where e.key_id_evento=e2.key_id_evento);
    Spiegato.See the plan:
    SQL> SELECT
      2  CARDINALITY,
      3  BYTES,
      4  COST,
      5  POSITION,
      6  PARTITION_START,
      7  PARTITION_STOP,
      8  PARTITION_ID,
      9  lpad(' ',level-1)||OPERATION||' '||OPTIONS||' '||object_name as Plan
    10    FROM PLAN_TABLE a
    11  CONNECT BY prior id = parent_id
    12          AND prior statement_id = statement_id
    13    START WITH id = 0
    14          AND statement_id = 'PART'
    15    ORDER BY id;
    CARDINALITY BYTES COST POSITION PARTITION_START PARTITION_STOP  PARTITION_ID PLAN
              1   144    5        5                                              SELECT STATEMENT
              1   144    5        1                                               NESTED LOOPS
              1    26    3        1                                                VIEW  VW_SQ_1
              1    17    3        1                                                 HASH GROUP BY
              2    34    3        1                                                  FIRST ROW
              2    34    3        1                                                   INDEX RANGE SCAN (MIN/MAX) EVENTO_PK
              1   118    2        2 KEY             KEY                        6   PARTITION HASH ITERATOR
              1   118    2        1 KEY             KEY                        6    TABLE ACCESS BY LOCAL INDEX ROWID EVENTI_P
                                                                                 M
              1          1        1 KEY             KEY                        6     INDEX UNIQUE SCAN INDICE_LOC
    Selezionate 9 righe.in which the cost is 5.
    the same thing for a non-partioned table:
    SQL> EXPLAIN PLAN SET STATEMENT_ID='NON_PART'
      2  FOR
      3  select * from EVENTI_PM2 e where e.key_id_evento='50000034' and dt_inserimento = (select min(dt_inserimento) from eventi_pm e
    2 where e.key_id_evento=e2.key_id_evento);
    Spiegato.see the plan
    SQL> SELECT
      2  CARDINALITY,
      3  BYTES,
      4  COST,
      5  POSITION,
      6  PARTITION_START,
      7  PARTITION_STOP,
      8  PARTITION_ID,
      9  lpad(' ',level-1)||OPERATION||' '||OPTIONS||' '||object_name as Plan
    10    FROM PLAN_TABLE a
    11  CONNECT BY prior id = parent_id
    12          AND prior statement_id = statement_id
    13    START WITH id = 0
    14          AND statement_id = 'NON_PART'
    15    ORDER BY id;
    CARDINALITY BYTES COST POSITION PARTITION_START PARTITION_STOP  PARTITION_ID PLAN
              1   144    5        5                                              SELECT STATEMENT
              1   144    5        1                                               NESTED LOOPS
              1    26    3        1                                                VIEW  VW_SQ_1
              1    17    3        1                                                 HASH GROUP BY
              2    34    3        1                                                  FIRST ROW
              2    34    3        1                                                   INDEX RANGE SCAN (MIN/MAX) EVENTO_PK
              1   118    2        2                                                TABLE ACCESS BY INDEX ROWID EVENTI_PM2
              1          1        1                                                 INDEX RANGE SCAN EVENTO_PK2
    Selezionate 8 righe.but the cost is the same, why?Even if only one partition was used. How i can demostrate to my self that the query in the partitioned table is better?
    I'm going to get crazy, partioned a table is not useful at all.Please help me!!!!!!!!!!!!!!!!!!!

  • Partitioning Streamed table

    Hello Team,
    We're running Oracle streams on 9205/Sun Platform. Tables are getting larger and larger for reporting database.
    Here's the scenario:
    Proddb ===> Proddb2 (Streams to one direction)We purge Prod every year and Proddb2 every three years. Tables are getting larger and we need to partition these tables (100 Million Rows min - 300 Million Max).
    Here's the Challenging Questions:
    1. Should we drop streams, partition tables and re-setup again
    A. If we re-setup again we need to syncronise databases, if so, how?
    B. To sync we need to export from Proddb to Proddb2 does it overright existing
    data from proddb2?
    2. Stop the streams and partition the tables and try re-starting it again and see, we
    never done this and I don't know if it works. I am assuming sequences will fail.
    3. Any other alternative solution from your site??
    Thanks in advance.

    You can do it differentlty. It is possible to use partitioned table on one side and non-partitioned table on different side.
    1) offline.
    You can use DBMS_STREAMS.SET_TAG procedure in order to skip any statements to be propagated. You can do anything like rename tables create newone and copy data
    Start replication - everything is in sync.
    2) You can just convert table to partitioned table. All data will stay in first partition and you can start new one.
    If you want to keep same partitons on both sides you need to enable DDL replication as well
    Sergey

  • Partitioning the table ...

    I have procedure which inserts the data based on sysdate (everyday). I have partitioned the table using partition by list i have created 31 partitions on this table.
    say for example if tis 8th of sep then the partition will be xyz_08 and tommorow will be xyz_09 similarly i have 31 partitions.
    I was trying to insert manually by changing sys dates for example like sysdate -1, sysdate -2, sysdate -3 and so on. And it worked absolutely fine
    My requirement :- is once its reaches to 31st partition then it has to drop the 1st partition and so on it continues by droping old partitions everyday once its inserted with the latest partition.
    my questions
    - how do incorporate a logic of adding partitions everyday ?
    - how to drop the oldest partition(1st partition ) when it reaches the 31 partition ?
    - do i need to use cursors and for loop to archive this both above tasks ?
    Any logic with example would be great. Sample code will be wonderful ??
    Thank you so much i appreciate it. !!!

    user642297 wrote:
    let me share my code how i am implementing the partition by list ...Please use the *\* tag before and after a sample code block (or database output) that you post. This formats the code properly (as predefined text output) and is a lot easier on the eye to read. (yes - copy the tag exactly as you see it here and paste it into your posting).
    In my previous posting i mentioned about the droping the partition. But thats not the right way i guess. Because if i drop the partition then the data will not be loaded in the same partition next time since that partition will be dropped.
    The best way would be truncating the partition i guess. so next time we can load the data in the same partition ....
    Correct. You can simply truncate the partition to empty it and ready if for a new data set. However, as already mentioned, a range partition and not a list partition may be more suitable.
    One of the great features of partitioning is called +partition pruning+. This means Oracle, at run-time, figures out what partitions to use, and what partitions to ignore, for a specific SQL query. As the data is date based. it makes more sense to use a date range partition - this allows pruning to happen when you look for data for a specific date or date range. With a list partition, you need to use the list column as is as a predicate... and it will be unusual to construct queries that only look at the day number and not as the date as a whole.
    few more questions
    - if i drop the table, will partitions will also be dropped automatically ? or do i need to explicitly drop the partitions before dropping the table ?
    Yes. Partitions is part of the table (these are physical storage containers for the data). Drop the table. Partitions gone.
    - how would i drop all the partitions at once ???
    By dropping the table. You cannot drop all partitions either - at least one partition must remain behind as a table needs a "+storage container+". It cannot be a table without a means of storing the data inserted into the table somewhere.
    i know i can use ALTER TABLE TABLE_NAME DROP PARTITION PARTITION_NAME. This only drops the particular partition but not all the partitions right????
    Correct.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Using JSSE : "Invalid Netscape CertType extension for SSL client" Error

    Hi all, Im using the sample code given sun site for JSSE with Client Authentication. The sample as such it worked with the testkeys provided in that. But it didn't workout when I tried using other certificates. Both client and server certificates I g

  • Welcome to the Oracle JRockit Real Time forum

    The JRockit forum over at forums.bea.com is since the first of July in read only mode - this is now the official forum for the JRockit Real Time product. Best regards, Stefan

  • DataBase Not Polling!!

    Hi All, I am using jDeveloper 11g. I have a process where i poll for particular rows on a Table in a Database. I have checked the Adapter(Database) configurations, and everything seems to be fine. But the Polling is not happening when i deploy the Pr

  • TS3408 The new domain .shoes is not opening in Safari

    There's a new domain .shoes and the only browser I can't access a webpage with this domain is Safari, which is a problem since users have to type the whole http://... (http included).  I know .shoes is a new domain, but in every other browser it's wo

  • How to configure Reconciliation only for a particular resource

    Hi All, I have a requirement to configure target reconciliation from AD only for a client. For that i have installed the conector as per documentation (both prov and recon). Now how can i make sure that:- 1. When i disable/enable the user in OIM, cor