Partitioning table
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Partitioning table

  1. #1
    Join Date
    Nov 2000
    Location
    London
    Posts
    83

    Question

    Hello. I have quite a large table: it contains approx 8 million rows for each of the time/date key.
    I want to make it into a partitioned table using the time/date key values.

    Question is: is it possible to partition this existing table e.g. using ALTER TABLE or do I have to create a table from scratch including a partition option?


  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    A non-partitioned table can not be "converted" to a partitioned table. You will have to re-create your table with the appropriate partitioning clause.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Nov 2000
    Location
    London
    Posts
    83
    Thought as much... more work for me then.

    Cheers for the help though!

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    you can do (with EMP table as example)

    Code:
    create table partemp(
    empno number(4) not null,
    ename varchar2(10),
    job varchar2(9),
    mgr number(4),
    hiredate date,
    sal number(7,2),
    comm number(7,2),
    deptno number(2))
    partition by range(empno)
    (partition partemp6 values less than (8000))
    /
    
    alter table partemp exchange partition partemp6 with table emp
    /
    
    alter table partemp split partition partemp6
    at (7000)
    into (partition partemp1,
    partition partemp6)
    /
    
    alter table partemp split partition partemp6
    at (7200)
    into (partition partemp2,
    partition partemp6)
    /
    
    alter table partemp split partition partemp6
    at (7400)
    into (partition partemp3,
    partition partemp6)
    /
    
    
    alter table partemp split partition partemp6
    at (7600)
    into (partition partemp4,
    partition partemp6)
    /
    
    alter table partemp split partition partemp6
    at (7800)
    into (partition partemp5,
    partition partemp6)
    /
    this should be pretty fast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width