Partitioning an already existing table

Hi,
I need to partition many existing tables. All these tables hold more than 50 million data each.
Since i am new to partitioning, can any one kindly guide what are the best practices one should look for under such circumstances.
Is it neccessary to dwell on the following point
1) Type of table (Heap or IOT etc).
2) Indexes and kinds of indexes along with the columns in which they are defined.
3) Block size
4) Constraints
5) Row Chaining, Migration etc.
I have very basic idea about the above mentioned points.
Please guide me as to how should the partitioning be done, what sort of partitioning is best, any performace issues.
I sincerely appreciate the cooperation of all members.
Thanks in advance
Message was edited by:
Master

Hi,
to create a partitioned table from the non portioned table
create table part partition XXXXXXXX
(partition p01 tablespace XX1,
partition p02 tablespace XX2,
partition p03 tablespace XX3,
partition p04 tablespace XX 4
nologging
as select * from old data ;
OR
export the old non partition table data – rename the non partitioned table, create partitioned table import the data
OR
Exchanging Partitions
You can convert a partition (or sub partition) into a non-partitioned table, and a non-partitioned table into a partition (or sub partition) of a partitioned table by exchanging their data segments. You can also convert a hash-partitioned table into a partition of a range-hash partitioned table, or convert the partition of the range-hash partitioned table into a hash-partitioned table. Similarly, you can convert a list-partitioned table into a partition of a range-list partitioned table, or convert the partition of the range-list partitioned table into a list-partitioned table
One of the great features about partitioning, and most specifically range-based partitioning, is the ability to load in new data quickly and easily with minimal impact on the current users. The manuals indicate that the critical command to achieve this is as follows:
alter table pt_tab1 exchange partition p_9999
with table new_data
Ani

Similar Messages

  • Can we create partitions in an existing table?

    Hi,
    Can we create partitions in an existing table which has about a million rows? I am using oracle 9i database.
    Can any one suggest me on this please.

    07b3ea8e-c4c5-4559-9055-ed38853dc64e wrote:
    Hi,
    Can we create partitions in an existing table which has about a million rows? I am using oracle 9i database.
    Can any one suggest me on this please.
    can NOT be done.
    research DBMS_REDEFINITION

  • Best way to change partition key on existing table

    Hi,
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    Thanks

    >
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    >
    First your subject asks a different question that the text you posted: Best way to change partition key on existing table. The answer to that question is YOU CAN'T. All data has to be moved to change the partition key since each partition/subpartition is in its own segment. You either create a new table or use DBMS_REDEFINITION to redefine the table online.
    Why do you want to export all data to a file first? That just adds to the time and cost of doing the op.
    What problem are you trying to use partitioning to solve? Performance? Data maintenance? For performance the appropriate partitioning key and whether to use subpartitions depends on the types of queries and the query predicates you typically use as well as the columns that may be suitable for partition keys.
    For maintenance a common method is to partition on a date by year/month/day so you can more easily load new daily/weekly/monthly data into its own partition or drop old data that no longer needs to be kept online.
    You should use a small subset of the data when testing your partitionings strategies.
    Can you do the partitioning offline in an outage window? If not then using the DBMS_REDEFINITION is your only option.
    Without knowing what you are trying to accomplish only general advice can be given. You even mentioned that you might want to use a different set of columns than the curren table has.
    A standard heap table uses ONE segment for its data (ignoring possible LOB segments). A partitioned/subpartitioned table uses ONE segment for each partition/subpartition. This means that ALL data must be moved to partition the table (unless you are only creating one partition).
    This means that every partitioning scheme that uses a different partition key requires ALL data to be moved again for that test.
    Provide some information about what problem you are trying to solve.
    >
    Is this quicker than datapump?
    >
    Yes - exporting the data simplying moves it all an additional time. Ok to export if you need a backup before you start.
    >
    Found artcle which talks about using merge option on datapump import to convert partitioned table to non-partitioned table.
    >
    How would that apply to you? That isn't what you said you wanted to do.

  • How to add create partition to an existing table?

    hi,
    please tell me how to add partition to an existing table.
    i have tried
    alter table mvr add partition sno
    but getting error : ORA-14501: object is not partitioned
    thanks.

    Just Googling for ora-14501 resulted in the following
    Adding a partition results in ORA-14501: object is not partitioned
    It is really sad you can not do this on your own, and always need someone to do this for you.
    Sybrand Bakker
    Senior Oracle DBA

  • Can we addnew partition and sub partition in the existing table in one shor

    can we addnew partition and sub partition in the existing table in one short

    nav wrote:
    can we addnew partition and sub partition in the existing table in one shortYes,
    You can and below is the example for Range-List partition
    ALTER TABLE <table_name>
       ADD PARTITION <partition_name> VALUES LESS THAN (<value>
          STORAGE (INITIAL 20K NEXT 20K) TABLESPACE <TS name> NOLOGGING
              SUBPARTITION Clause
              SUBPARTITION Clause
              SUBPARTITION Clause
              SUBPARTITION Clause
               );

  • Oracle partitioning - change in existing tables

    I recently started working with legacy code and noticed that some huge tables (5 years worth of data, don't have more details on me right now but can post later if needed) are partitioned based on time sequence number column while majority of queries are done based on time (different column). Queries performance is degrading over time and I'd like to try to modify partitioning and run some tests to see if there is a performance improvement.
    My only concern is this is a lot of data and they are all live, so I have to come up with some sort of solution on how to switch partitioning with the least impact on applications running 24 x 7.
    Can someone suggest a viable solution? Something you have done in the same situation and it worked?
    If there is a certain technique on how to do it, please give me search keywords and I will google the rest.
    Thanks,
    S.

    You can't change the partitioning of an existing table.
    You can, however, use the DBMS_REDEFINITION package to do an online redefinition. Behind the scenes, what you're really doing is
    - Creating a new table with the new partitioning scheme
    - Copying the data from the old table to the new table
    - Dropping the old table
    - Renaming the new table to the name used by the old table
    Now, if the large table is only being queried, not updated (or at least you have a window where it is read-only), it's probably easier to just do these steps manually rather than using DBMS_REDEFINITION where you at least have finer grained control over the steps. You'll still need a moment where the table is inaccessible to do the actual rename.
    Justin

  • How add primary key constraint to already existing table with data

    I want apply primary key constraint to already existing table with data
    is there any command or way to do

    Alternatively, assuming you want to ensure uniqueness in your primary key column you can do this:
    alter table <table name> add constraint <cons name> primary key (col1,col2) exceptions into <exception_table>
    If the altter table statement fails this will populate the EXCEPTIONS table with the rows that contain duplicate values for (col1,col2).
    You will need to run (or get a DBA to run) a script called UTLEXCPT.SQL (which will be in the $ORACLE_HOME/rdbms/admin directory) if you don't already have an EXCEPTIONS table.
    Cheers, APC

  • Already existing tables in oracle 10g problem

    Hi, i am new to oracle and just installed oracle 10g, my porblem is that when i ran the query i got an error.
    SQL> select *
    2 from emp;
    from emp
    ERROR at line 2:
    ORA-00942: table or view does not exist
    As emp table already exist in database but it does not show result. please help me. Thanks.

    i have heared form someone that i should copy some text (from files) or some files which resides in bin folder (i don't know the exact path) in the sql console to access existing tables. is that ture?Not sure what that means... to access existing tables, or to create new ones you have to use Sql commands (or some graphic stuff).
    What about reading some documentation ?
    System user is a DBA, and can possibly read any tables, but most probably is not the owner of emp table. To know it you can do
    SQL> select owner from dba_tables where table_name='EMP';
    then connect to that user, or, as system user, do
    SQL> select * from <owner>.emp;

  • Logical type Partition of an existing table

    Dear All,
    My database is 10gR2 and Linux is the operating system.
    One of my table in production database is huge and contains lot of data. Table is growing on daily basis. There are many queries that users execute on this table and the criteria of selection is normally entry date of the record, its a field Entrty_Date with date datatype.
    I want logical partition on this table in such a way, that the table name remains the same, and data is partitioned logically.
    Like if the Entry_Date is starting from 2005, a partition is made on the criteria:
    2005-2006
    2006-2007
    2011When user query for records having entry date > 2011... the query is made only this chunk of the table, making the query fast.
    I hope I am able to make you understand my problem. If its possible in Oracle please let me know the name of the method and I will RND on this one. And I have to do it on existing table that contains lot of data.
    Thanks,
    Imran

    For example:
    CREATE TABLE sales
    ( prod_id NUMBER(6)
    , cust_id NUMBER
    , time_id DATE
    , channel_id CHAR(1)
    , promo_id NUMBER(6)
    , quantity_sold NUMBER(3)
    , amount_sold NUMBER(10,2)
    PARTITION BY RANGE (time_id)
    ( PARTITION sales_q1_2006 VALUES LESS THAN (TO_DATE('01-APR-2006','dd-MON-yyyy')) TABLESPACE tsa
    , PARTITION sales_q2_2006 VALUES LESS THAN (TO_DATE('01-JUL-2006','dd-MON-yyyy')) TABLESPACE tsb
    , PARTITION sales_q3_2006 VALUES LESS THAN (TO_DATE('01-OCT-2006','dd-MON-yyyy')) TABLESPACE tsc
    , PARTITION sales_q4_2006 VALUES LESS THAN (TO_DATE('01-JAN-2007','dd-MON-yyyy')) TABLESPACE tsd
    );

  • How to add partition to an existing table

    I have a table that contains lot of data.I need to add partitions to it to improve the performance of the procedures
    using this table.This table is having no existing partition.

    create partitioned table and move your data into. You can't create partitions based on common heap-table.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/partconc.htm#CNCPT011

  • CRXI - Adding SQL subtables to already existing tables in a report

    Crystal Reports XI
    SQL 2005
    I have a SQL 2005 set of tables and subtables with their respective fields.  In one of a pre-existing CRXI report there's an Opportunity table which now has a new "Opportunity_Details" subtable related to the original Opportunity table.  This is a 1:1 relationship so that for each and every Opportunity record in the Opportunity table there exists only one Opportunity_Details record.. and vice versa.  I can see the Field Explorer on the lower right of the screen but how do I ADD (connect?) the Opportunity_Details table to the pre-existing Opportunity table so I can use BOTH tables in a report?  I've looked into Data Source Location but that didn't do anything.  I can see all the respective fields in all tables in the Field Explorer.  I just need to ADD a new table to the Field Explorer either 'under' the Opportunity table or 'under' the Database Fields area.
    Once the connection is made is this connection valid for any and all sub-reports also?
    My experience is primarily on v8.5 so some 'easy' assistance here would be helpful. I've looked around but nothing seems to jump out!
    TIA!!

    >
    total1 wrote:
    > I don't follow you on this request!
    > What I have just tried is to go through the Set Datasource Location>Create New Connection>OLE DB (ADO)>Microsoft OLE DB for SQL Server and then connected to the server, then selected the MySQLDB.  VISUALLY, this seemed to work but I may have TWO connections to MyServer and MySQLDB.  The Field Explorer dialog box with Database Fields now shows an additional table (the table I desire) BUT I'm not convinced that what I did IS the correct methodology/process.  [This is under a single Database Fields in alphabetical order.]  Performance or even correct functionality may be sacrificed.  Is there a way to know if what I've done IS correct?  I have doubts...  For example the Set Datasource Location>Current Data Source shows TWO (2) MyServers with Properties and the respective tables for each as selected for each connection.  That is, the second MyServer shows the table I just selected and the table I just selected isn't listed in the first MyServer connection.  It still has the original tables.
    > HTH
    > Thanks...
    It sounds right. Verify your database for the connection that does not show the table. If it does not show up, try setting the location again, setting the original connection list of tables to the new connection (I hope that makes sense).
    I can not see the document you listed as my IT department has that web side blocked

  • Install bootcamp with 2 partitions that already exist

    I Need to use ms publisher and pararells won't cut it because I need to copy and paste. Currently I have two partitions , one for applications and one for the user. It works for me. bootcamp says it needs one partition. What can i do? Is there a way to safely merge the twho partitions together without losing data?

    No, there is no safe way to merge the two partitions together, but there is a way to do it non-destructively.
    If you open Disk Utility and select the main drive entry on the left, you will find your partitions stacked one on top of the other from the Partition tab. You have two partitions, already, one of which is the boot partition. Usually this is the topmost or first partition. I'll assume that's your situation. You need to transfer everything on the second partition to the first partition. You need to do this with backup software such as Carbon Copy Cloner 3.5.6 so as to preserve permissions.
    Once you have that accomplished you need to delete the second partition. Select the Partition tab. Select the second partition then click on the Delete [-] button to remove it. Click on the Apply button. Next, use the cursor to grab the triangular shaped gadget in the bottom right corner of the remaining partition and drag the box all the way to the bottom of the map. Click on the Apply button.
    You may now use Boot Camp Assistant to create your Windows partition.
    I suggest you have a backup of everything just in case something goes awry.

  • Performing impdp into an already existing table

    hi
    i have a schema named current_students
    which has a table of all the student information (student_master)
    i was to syncronize this table with another schema's same table.
    (i want to sync this student master of current_students into student_master of all_students schema)
    the thing is student_master of all_students schema already has values. what i want is to just append the table.
    it was possible in the old exp / imp by ignore=y keyword.
    how can i do this using impdp ???
    plea help
    thanx in advance

    how can i do this using impdp ???impdp help=yes

  • Generate a Number for a already existing table with records

    Hi All,
    Is it possible to generate number for a column in a table. The table already has 50,000 records. I have a empty column in which I want to generate number sequentially for reference purpose......
    Whether it can be done ?????
    I was thinking og Merge/ rownum I didnt get any possibls solution out of it .........any suggestions....
    Thanks
    Ananda

    I have a empty column in which I want to generate number sequentially for reference purposeThe following table content :
    Oracle
    DB2
    MSSQLNow, you have to put a kind of ID, but what row will get the 1st ? What row will get the 2nd ? etc.
    If you don't care, then sequence as suggested is your friend. Then, you could use also sequence for further insert.
    Nicolas.

  • Partitioning an Existing Table

    Dear Forum,
    Can we create partition on an existing table without dropping it in Oracle 11.2.0.3.0?
    I know EXCHANGE PARTITION, but that I don't want.
    Thank you & regards.

    You cannot partition an existing table.
    You have to create a new partitioned table and move the data from the old table to the new table. If you want to do this online, you can potentially leverage the DBMS_REDEFINITION package to help you out. Behind the scenes, you're still creating a new table and, eventually, dropping the old table after moving all the data over. DBMS_REDEFINITION hides some of that from you and lets the table remain online while you are moving the data. But it adds some performance overhead.
    Justin

Maybe you are looking for

  • Adobe Acrobat X Standard download

    Where can I find a download for Adobe Acrobat X standard?

  • Are there any intensions by apple to upgrade photos to be more like iPhoto?

    I would like to know if Apple has any intensions on updating the Photos app on the iPad or ipad 2, to have a little bit more control for exporting and printing photos that have either been taken by the iPad 2 or that have been imported. A little more

  • TDS in Payment on Account

    Hi All,        What is the process of deducting TDS on Payment on Account ( In Outgoing payments ). Please reply fast. Regards, Abhishek Edited by: Rui Pereira on Nov 7, 2008 11:59 AM

  • IPhoto 4.0.3 Strange problem

    Been running iphoto 4.0.3 problem free since mid 2005. Now it seems to have a bug of some sort. A number of my Albums are not showing the correct photo when in 'Organize' mode. The photo's are from other albums and a few don't show the full image-bot

  • Export an XML or EDL which will keep the clip's full name

    Greetings, I've been working with R3d (RED EPIC format) footages in premiere cs6 and i need to export an XML or EDL which will keep the clip's full name, in order to use it for further post production (davinci). How do i do it?