Partitioning the tables

i have a table that logs an actigtivity
it has activity date time
its a very large table...which i havnt partitioned.
because i havnt got the archiving requirements.
my questions is .. should i blindly create a monthly partition based on date key or should i wait for the archiving requirements?
what is the criteria to partition the table?
is it the amount of data ... or the archiving strategy. which one of these two should i take as the deciding factor to create partitions
regards
raj

my problem is that
i have two tables A and B
A has a column called activity date time and B is the child table for A.
i did not create partitions on both the tables because... i did not know the online data requirement.
now for a code move people are complaining that i did not create monthly partitions before...
my quesitioon is that...
shouldnt we wait for the online data requirement to come then think of partitioning the table?
or rather than waiting
should we blindly create the monthly partitions on activity date time?
regards
raj

Similar Messages

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

  • 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

  • Do i need to partition the table...?

    hi,
    i have a table which is having the following fields, the average entry expected into this table is nearly 25000 rows per month. and it will be queried daily based on shift_date, shift, and machine.
    do i need to partition this table. if yes how or on which fields i need to to this....?
    BOOKING_REFNO,
    PONUMBER,
    SHIFTDATE,
    OPER_ID,
    MACHINE,
    SHIFT,
    STATUS,
    JOB_HRS,
    JOB_START,
    JOB_END,
    ORD_QTY,
    YIELD_QTY,
    SCRAP_QTY,
    OPER_SEQ,
    CONF_TYPE,
    POSTATUS_REF,
    SHIFT_STATUS,
    COMB_REFNO,
    COMBINED,
    SHIFTAUTOSTAT,
    REASONCODE,
    REASON,
    CONF#
    thanks in Adv
    Kris

    I wouldn't go for partitioning table for 25,000 rows by month. Just a though.
    Anyway, the partitioning question cannot be take in 5 minutes, you should ask yourself why you want it (do you have to archive "old" rows ?), study, benchmark...
    But first of all, the reading of the following article may help you before choosing to go in partition, and choose how use it : Partition Decisions
    In all cases, we cannot answer on which column you have to partition table, we don't know application queries and what are the "key" column(s) (which you should know before decide).
    Nicolas.
    PS : partition is an option of Entreprise Edition with additional fee (an other point to take in account).

  • Range partition the table ( containing huge data ) by month

    There ia a table with huge data ard 9GB.This needs to range patitioned by month
    to improve performance.
    Can any one suggest me the best option to implement partitioning in this.

    I have a lot of tables like this. My main tip is to never assign 'MAXVALUE' for your last partition, because it will give you major headaches when you need to add a partition for a future month.
    Here is an example of one of my tables. Lots of columns are omitted, but this is enough to illustrate the partitioning.
    CREATE TABLE "TSER"."TERM_DEPOSITS"
    ( "IDENTITY_CODE" NUMBER(10), "ID_NUMBER" NUMBER(25),
    "GL_ACCOUNT_ID" NUMBER(14) NOT NULL ,
    "ORG_UNIT_ID" NUMBER(14) NOT NULL ,
    "COMMON_COA_ID" NUMBER(14) NOT NULL ,
    "AS_OF_DATE" DATE,
    "ISO_CURRENCY_CD" VARCHAR2(15) DEFAULT 'USD' NOT NULL ,
    "IDENTITY_CODE_CHG" NUMBER(10)
    CONSTRAINT "TERM_DEPOSITS"
    PRIMARY KEY ("IDENTITY_CODE", "ID_NUMBER", "AS_OF_DATE") VALIDATE )
    TABLESPACE "DATA_TS" PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE ( INITIAL 0K BUFFER_POOL DEFAULT)
    LOGGING PARTITION BY RANGE ("AS_OF_DATE")
    (PARTITION "P2008_06" VALUES LESS THAN (TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    TABLESPACE "DATA_TS_PART1" PCTFREE 10 INITRANS 1
    MAXTRANS 255 STORAGE ( INITIAL 1024K BUFFER_POOL DEFAULT)
    LOGGING NOCOMPRESS , PARTITION "P2008_07" VALUES LESS THAN (TO_DATE(' 2008-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS',
    'NLS_CALENDAR=GREGORIAN'))
    TABLESPACE "DATA_TS_PART2" PCTFREE 10 INITRANS 1 MAXTRANS 255
    STORAGE ( INITIAL 1024K BUFFER_POOL DEFAULT) LOGGING NOCOMPRESS )
    PARALLEL 3

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

  • Partitioning the OKL_STRM_ELEMENTS table

    I am looking for someone with experience with partitioning the OKL_STRM_ELEMENTS table. I would like to know what you partitioned on and if you had any problems once you implemented the partitions. Besides the OKL_STRM_ELEMENTS table are there any other Lease Management table that should be partitioned.
    BLC

    This is documentation of the Partitioning the OKL_STRM_ELEMENTS table
    You should made a proposal to partition the table based on STREAM_ELEMENT_DATE Performance team however suggested creating a larger number of partitions using a smaller range (MMYYYY vs YYYY) rather than using a subpartition by hash(ID).
    Performance benefits may be seen in SQL statements that take advantage of the partioning scheme resulting in partition elimination (i.e. the sqls actually scan less data), this happens for sqls that have the partition key in the WHERE clause.
    Partitioning a table can actually degrade overall performance if the SQL statements referencing this table do not include the partition key in the WHERE clause as a filter. The performance degradation is caused by the fact that the query has to scan several partitions as opposed to a single segment in the non-partitioned case.
    The majority of select statements on OKL_STRM_ELEMENTS in OKL do include STREAM_ELEMENT_DATE in the where clause, so overall benefit should be positive.
    Moreover, ranges should be based on analysis of your data distribution

  • 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

  • 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

  • Problem regarding partitioning of tables

    hi all....good afternoon
    I have a table of huge number of records and thats why I want to do partitioning of that table.
    The column upon which I have to make the partition is of varchar2(7) type which contains the data in the format '2009APR', '2010JAN' etc etc..
    Now I have to fetch out the first 4 characters of the datas (i.e only the year) and then I can partition the table based on the years.
    How can I do that....plss help.
    create table test123
    (name varchar2(10),
    age number,
    DOB varchar2(7),
    gender varchar2(1)
    Edited by: user12780416 on Dec 24, 2010 2:48 AM

    Just partition by DOB column:
    SQL> create table test123(
      2                       name varchar2(10),
      3                       age number,
      4                       DOB varchar2(7),
      5                       gender varchar2(1)
      6                      )
      7    partition by range(DOB)
      8      (
      9       partition DOB_past values less than('2009'),
    10       partition DOB_2009 values less than('2010'),
    11       partition DOB_2010 values less than('2011'),
    12       partition DOB_maxvalue values less than(maxvalue)
    13      )
    14  /
    Table created.
    SQL> insert into test123 values('X',0,'2010APR','M')
      2  /
    1 row created.
    SQL> select count(*) from test123 partition(DOB_2010)
      2  /
      COUNT(*)
             1
    SQL> insert into test123 values('Y',0,'2009JAN','M')
      2  /
    1 row created.
    SQL> select count(*) from test123 partition(DOB_2009)
      2  /
      COUNT(*)
             1
    SQL> SY.

  • I have partitioned my tables, do I need to rebuild the indexes of the table

    Hello,
    I have partition very huge tables, by using rage partition method. After that few queries taking more time than before. Does the old indexes needs to rebuild?
    Thanks

    929941 wrote:
    Hello,
    I have partition very huge tables, by using rage partition method. After that few queries taking more time than before. Does the old indexes needs to rebuild?
    ThanksWhat do you think?
    By the way, how did you partition existing tables? Did you use dbms_redefinition, or did you use CTAS, or some other method?
    I love RAGE partitions. You should always always partition your rage.

  • Partitioning the fact table

    Hi Gurus,
    I have a question regarding partitioning the cube. When you partition the cube from the Extras menu, will it partition the F table or is it the E table or both.
    Second question: After partitioning, how will i know the newly created table names.
    Thanks,
    ANU

    Hi Anu,
    Partition Need and its definition
    Infocube contains huge amount of data n the table size of the cube increases regularly. so
    when a query is executed on cube then it has to check entire table to get the records for
    example Sales in Jan08.
    Advantage of Partition
    so we can partition the cube so that smaller tables are formed .so that report performance
    will increase bcoz the query hits that particular partition.
    Steps for Partition
    1.To partiotion a cube, it must not contain data.
    2. Partition can be done using time characteristics 0CALMONTH and fiscalperiod.
    steps:
    1. in change of the cube, select extras menu and Partioning option.
    2. select calmonth time characteristic.
    3. it will ask for the time period to partiotion and no. of partiotions. give them
    4. activate the cube.
    In BI 7 we can partition the cube even if it contains data.
    select the cube, right click , select repartitioning.
    1. we can delete existing partitions
    2. create new ones
    3. merge partitions.
    Partitioning of the Cube
    http://help.sap.com/saphelp_nw04s/helpdata/en/0a/cd6e3a30aac013e10000000a114084/frameset.htm
    Partitioning Fields and Values
    partition of Infocube
    Partitioning of cube using Fiscal period
    Infocube Partition
    After Partition
    You can find the Partition in the following tables in SE11 >
    E tables /BIC/E* or /BIC/E(cube name)
    Please also go through the following links
    Partioning of Cube
    partioning
    Partioning of ODS object
    /thread/733456 [original link is broken]
    Hope i had answered your question
    Assign points if helpful,
    Thanks and regards
    Bala

  • Foreign keys at the table partition level

    Anyone know how to create and / or disable a foreign key at the table partition level? I am using Oracle 11.1.0.7.0. Any help is greatly appreciated.

    Hmmm. I was under the impression that Oracle usually ignores indices on columns with mostly unique and semi-unique values and prefers to do full-table scans instead on the (questionable) theory that it takes almost as much time to find one or more semi-unique entries in an index with a billion unique values as it does to just scan through three billion fields. Though I tend to classify that design choice in the same category as Microsoft's design decision to start swapping ram out to virtual memory on a PC with a gig of ram and 400 megs of unused physical ram on the twisted theory that it's better to make the user wait while it needlessly thrashes the swapfile NOW than to risk being unable to do it later (apparently, a decision that has its roots in the 4-meg win3.1 era and somehow survived all the way to XP).

  • Truncating old partitions in the table.

    Hi,
    Can you pls helpme out in writing a job/script(procedure) to truncate 6 older partitons with date range partition 'YYYY-MM' in the table!!!
    Thanks,

    I have a 20 partitioned tables with more than year old data with range partitioning.
    I am trying to develop a package/job either to drop or truncate 6 months older partitions.
    I will truncate partitions periodically on each schema - not all at once.
    if you someone can send me the scripts/procudure - that really helps my task.
    Thanks,

  • Confirmation of the  table  partitioning(Oracle)

    Hi,
    I have partitioned the DB table via T-cd:SE14. according to the note 742243. This table contains more than 1,000,000 records.
    but it takes only 5 seconds to "activate the database and data conversion" (se14).
    So I cannot be confident if this table is really partitioned.
    How can I confirm this?
    Kind regards,
    Masaaki

    Hi,
    Thank you very much for your help.
    but this table seems not to be possible to check from SAPGUI.
    user_part_tables  (it is not defined in abap dictionary)
    is it possible from SAPGUI?
    excuse me,, I am not know so much about basis matter...
    Kind regards,
    Masaaki

Maybe you are looking for

  • New Standalone SharePoint 2013 on Windows 2012 r2 Config errors

    I have Googled and thrown spaghetti at this to no avail. I have a new instance of SP2013 on Windows 2012 running on VMWare. The install is standalone but these are errors I would like to clear before setting up an Intranet for the new company I am wo

  • How can I get my iTunes to start up after a clean re-install?

    Following the corruption of many of my Applications and Files, I had to have a Clean Re-install done. That solved most of the problems, but when I try to start iTunes it comes up with the iTunes Software Licence Agreement. When I click on Agree, I ge

  • In 2 Node RAC clients always connect to Node 2...

    Dear all, I have installed RAC 10gR2 on Oracle Enterprise Linux Version 4 Update 5. ASM as storage option on iscsi shared storage. In Enterprise Manager I can see 2 instance are UP! i can connect to oracle from any one of the node. All services are r

  • How i can open dir file created by latest version of director, by older version director?

    Hi several director files reveive to me. They created by director 12. I have director 11.5. When i open these files they can not open and director show error: File is too new. Is it possible we use this files by 11.5?

  • Dvds not reading

    Every time I put a DVD into my Macbook Pro Running 10.7.5 OSX the DVD is rejected.  I am not exactly sure why this is the case.  It is a DVD and not blue ray.  I've trouble shot it a while and would appreciate it if anyone else may know what to do or