Partitioned tables wtih range....
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Partitioned tables wtih range....

  1. #1
    Join Date
    Aug 2000
    Location
    Sao Paulo
    Posts
    114

    Question

    Gentlemen,

    Good morning.
    I have a subject.
    I have a table (Customer) with the columns Code, numeric ,4 and Name varchar2 30
    I have 4 tablespaces calls tab_1, Tab_2, Tab_3 and Tab_4.
    In the table they will enter data and this data will be above partitioned in the tablespaces.
    They put......
    It would like that in the tablespace tab_1 were the data of 1 at 500 and 800 to 1200
    In the tablespace tab_2 they were the data of 501 at 799 and 1201 to 1500
    in the tablespace tab_3 they were the data from 1501 to 5000
    and in the tablespace tab_4 they were the remaining ones.
    for the that I saw myself it seems that the smaller clause than (less than) doesn't let to do me this arrangement.

    Question: ??? I have as doing this particionamento type. It is been I have as I should do
    I thank if he/she also gives me an example (script)

    Thankful

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    I would setup 6 partitions:
    part1 - tablespace tab1 - 1-500
    part2 - tablespace tab2 - 501 - 799
    part3 - tablespace tab1 - 800 - 1200
    part4 - tablespace tab2 - 1201 - 1500
    part5 - tablespace tab3 - 1501 - 5000
    part_max - tablespace tab4 - maxvalue
    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
    Jun 2000
    Posts
    117
    Here is an example of range partitioning using birthdates.
    You can do the same with your numeric column.

    CREATE TABLE PARTITION_BY_RANGE
    ( FIRST_NAME VARCHAR2(10),
    MIDDLE_INIT VARCHAR2(1),
    LAST_NAME VARCHAR2(10),
    BIRTH_MM INT NOT NULL,
    BIRTH_DD INT NOT NULL,
    BIRTH_YYYY INT NOT NULL)
    PARTITION BY RANGE (BIRTH_YYYY, BIRTH_MM, BIRTH_DD)
    (PARTITION DOBS_IN_1971_OR_BEFORE VALUES LESS THAN (1972, 01 ,01) TABLESPACE TS01,
    PARTITION DOBS_IN_1972 VALUES LESS THAN (1973, 01 ,01) TABLESPACE TS02,
    PARTITION DOBS_IN_1973 VALUES LESS THAN (1974, 01 ,01) TABLESPACE TS03,
    PARTITION DOBS_IN_1974 VALUES LESS THAN (1975, 01 ,01) TABLESPACE TS04,
    PARTITION DOBS_IN_1975_OR_LATER VALUES LESS THAN (MAXVALUE, MAXVALUE, MAXVALUE) TABLESPACE TS05)
    ENABLE ROW MOVEMENT;


    E. Yen
    OCP DBA 8, 8i, 9i

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