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

Similar Messages

  • 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

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

  • I have duplicated a sheet and need to rename the tables in the duplicate.  Can anyone help me?

    I have duplicated a sheet in Numbers and need to rename the tables in the duplicate sheet to avoid circular references.  Can anyone help me?

    Hi Pacarina,
    I'm not sure if this is your question (I'm puzzled by your mention of circular references) but this is how you change a table name in Numbers 3. Select the table (click on it), then make sure Table Name is checked in the Table tab of the format panel, then edit the name directly where it appears above the table.
    SG

  • 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

  • I would like to be able to view my security cameras at my home on my apple. I have been told that I would need to partition the hard drive to be able to take a windows program. Is there apple software that would allow me to see my security cameras

    I would like to be able to view my security cameras at my home on my apple. I have been told that I would need to partition the hard drive to be able to take a windows program. Is there apple software that would allow me to see my security cameras on my mack book pro

    Your security cam questions may have answers if you read the security cam or nanny cam section on EZJim's Website 

  • I have partitioned my time capsule, but I can't get it to work as a Time Machine back up and permanent media server for both mac and PC. What format do I need to partition the drive to so that it works for both mac and windows and so that it will be visab

    I have partitioned my time capsule, as I want part of it to act as a media server for both mac and windows. However I don't know what format that I need to partition it to. I also can't make it a permanently accesible drive. I want to restore the drive to the original format (which I don't know) and start again and re-partition the drive in a format that can be used for media by both mac and PC and for time machine back-ups and make the media part of it permanetly accesible so I can add and acccess my files.
    Thanks

    You are mixing up a couple of things here.
    The TC drive cannot be partitioned without removing it.. did you do that?
    If you partition it you must use a Mac disk utility and use the HFS+ ie standard Mac format. And GUID partition table not windows type.
    You can select erase disk in the airport utility.. that will take the disk back to original format. No partitions. TC is deliberately not partitioned as it is not a media server.. it is a backup device for TM. Over time .. the disk will be filled with TM backups so you have a long history of file changes to your computer.
    There is no media server in the TC.. it is merely disk storage.. you can serve files from it to a media device.. but the TC itself is dumb as dumb.
    Now the actual format of the drive is irrelevant to the PC.. The TC offers SMB file services to the network. You can copy files to and from the TC as if it was a local disk without caring one iota about the format. The TC handles that .. it is not a local disk .. it is a network drive.
    Although you cannot partition the TC. you can still copy files to it.. this does have implications for TM.. but as long as there is plenty of free space should not be a major issue.
    You can create a disk image via the disk utility in a Mac.. and as stated you can create partitions if you do it on a Mac with the disk directly connected which means breaking warranty if any exists on the TC.

  • Need to know the table for sales org and sales area of role Sold-to  in CRM

    Dear Sir,
    Our server is CRM 5.0, I would like to download the data from CRM , however, I would like to know the table name which keep the sales org and sales area of role Sold-to  in T-code : BP . However, we can't find the actualty table.
    Please kindly advise.
    Thank you
    Lek

    Hi Vimol,
    You can get Org details in various tables like Sales Org, Division, Distribution Channel in following tables with help of PARTNER_GUID.
    Sales :
    CRMM_BUT_LNK0010
    CRMM_BUT_LNK0011
    Shipping:
    CRMM_BUT_LNK0020
    CRMM_BUT_LNK0021
    Billing :
    CRMM_BUT_LNK0030
    CRMM_BUT_LNK0031
    Organization :
    CRMM_BUT_LNK0140
    CRMM_BUT_LNK0141
    I think, for you Organization related table CRMM_BUT_LNK0141 would be useful.
    From this table you will get Sales Org, Division, Distribution Channel.
    And in order to get Sales Office of BP, you will get it from table CRMM_BUT_SET0140 where you can put set_guid fetched from CRMM_BUT_LNK0141
    Hope this helps....Please reward points if useful.
    Regards,
    Shailesh Jadhav

  • 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

  • Help needed in partitioning a Table

    Hi,
    We can partiton a table by the following
    create table sales (
         product_id     number,
         trans_amt     number,
         sales_dt     date,
         state_code     varchar2(2)
    partition by list (state_code)
    partition ct values ('CT'),
    partition ca values ('CA'),
    partition def values (default)
    But if we dont know the values like 'CT' , 'CA' ....how can we do the partition

    If you really don't know the values at all, or values that can change in future, use hash-partitioning.
    For values that you mostly know and is unlikely to change, use list-partitioning, and accept you to do some maintenance in shuffling values around the partitions when they change.
    But, hopefully you do know your states and they don't change too often.

  • Need to find the table of RV45A-ETDAT for Report Development

    Hi Everyone,
    I need to bring a field on a custom report - 'First Date' in the Sales Order at item level.
    It is populated with a structure RV45A and the field is ETDAT.
    Apparrently this field is not directly stored in the sales order related database table like VBAP.
    Kindly advise on how to find 'from where to pick this field value' for a custom report development.
    Thank you very much for your help.
    Hemant

    Hi,
    The field ETDAT field is not stored in any SAP Table.
    Probably the field ETDAT in your structure RV45A is populated with data at runtime and that data might be reassigned to some other field.
    You can check the same only in debugging the standard code of that transaction.
    Reward if helpful.
    Warm Regards
    R Adarsh

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

  • Query Needed for Partitioning table

    Hi,
    I have created a table called Test. There is a column named business_name.
    There are several businesses like ABC,BCD,ADE....
    There will be lakhs of rows corresponding to each business, i mean there will be lakhs of entires corresponding to ABC,BCD....
    So i like to partition the table according to business_name so that the search will be more faster.As we had partitioned according to the business_name, i hope we need to search only on the partition corresponding to the particular business.
    can any one provide the Query to partition the table ' TEST ' according to the column ' business_name ' .
    Also can anyone provide Query to modify the already existing table ' TEST ' to incorporate partition for the column ' business_name '.

    We can partiton a table by the following
    create table Generalledger (
         record_id     number,
         business_name     varchar2(3)
         sales_dt     date,
         amount     number(10)
    partition by list (business_name)
    partition ct values ('ABC'),
    partition ca values ('BCD'),
    partition def values (default)
    But if we dont know the values like 'ABC' , 'BCD'
    ....how can we do the partitionuse SQL to generate part (or all) of your DDL statement. The following will output one partition statement for each business_name:
    SELECT DISTINCT 'partition p_' || BUSINESS_NAME || ' values (''' ||
                     BUSINESS_NAME || '''),'
    FROM GENERALLEDGER;

  • Need to update row in the table if any one of the value is getting updated

    Hi All,
    I am new to SQL, I need to update the table's row if any one of the value of the row is getting updated, if none of the value is updated then do nothing.
    Advice requested

    It is not clear what you meant... Perhaps a trigger 
    CREATE TRIGGER ShowUpdatedColumns ON Test FOR UPDATE
    AS
    DECLARE @ColumnID int, @Columns nvarchar(4000), @ObjectID int, @LastColumnID int
    SET @ObjectID=(SELECT id FROM sysobjects WHERE name='test')
    SET @LastColumnID=(SELECT MAX(colid) FROM syscolumns WHERE id=@ObjectID)
    SET @ColumnID=1
    WHILE @ColumnID<=@LastColumnID BEGIN
    IF (SUBSTRING(COLUMNS_UPDATED(),(@ColumnID - 1) / 8 + 1, 1)) &
    POWER(2, (@ColumnID - 1) % 8) = POWER(2, (@ColumnID - 1) % 8)
    SET @Columns = ISNULL(@Columns+',','') + COL_NAME(@ObjectID,@ColumnID)
    SET @ColumnID=@ColumnID+1
    END
    PRINT 'Updated columns are :' + @Columns 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • 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

Maybe you are looking for

  • What do i need to connect my macbook pro to my samsung widescreen tv?

    My Samsung Widescreen TV has a hook-up (15 pin connector/serial port?) for a PC. What do I need to do to connect my MacBook Pro to it and can I use the TV as the monitor or for viewing an internet website?  I'm trying to use the larger screen for a m

  • Why does Pages keep creating a new folder everytime I save?

    There must be some easy explanation for this but there's a weird quirk in Pages '09 that I don't know how to turn off. Every time I save a document, not only does it save, but it creates a new folder with some new files labeled buildVersionHistory.pl

  • Addition of field in asset master record

    Dear All:               I want add a field IN HOUSE PRODUCTION in asset master data creation, Moreover i want to add a field of Iniatiator in Asset master data. Please guide where should i go in SPRO. Waiting for your reply. Regards               Ati

  • Null item (pk) in master detail form

    Hello I use two tables to create a master detail form, in the master table I use a PK based on an existing trigger on the db and that same field is used in the detail table as an FK. When I create a new master detail form I want to insert all the ite

  • WSUS 4.0 and SCCM 2012 SP1 Sync Errors

    SCCM 2012 SP1 is installed on a Windows 2012 Std server with the WSUS 4.0 Role installed. All other links I have found list a 2008 R2 Server with WSUS 3.0 SP2 hence all the "fixes" revolve around hot fixes and patches/settings for WSUS 3.0 or 2008 R2