Results 1 to 5 of 5

Thread: Creating partition of database tables

  1. #1
    Join Date
    Jan 2010
    Posts
    51

    Creating partition of database tables

    A large database has so many tools to handle but tell me some methods to distribution of particular object on different places,Is it possible to do if yes then let me know.How would I distribute ? Can you provide me some information about table partitioning,if a database table is large to store on the server,we can place it somewhere else.explain me with the examples.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Creating partition of database tables

    In current days,organization uses a large database with a lot of size (in gigabytes and Terrabytes).
    Oracle database provide much more feature of partitioning the object of database from earlier versions.
    Assume the table "sales_data" contains millions of records but all the records belong to four years only i.e. 1988, 1989,1990 and 1991 and you require only the latest record of the database you will query to access the data like this -

    Code:
    SQL>select sum(amount) from sales_data where production_year=1990;
    SQL>select product_name,sum(amount) from sales_data where production_year=1991
      Group by products;
    The oracle will scan the whole table to fetch the record and consume much time to produce the result of the query.But if you are using partitioning then it would be much easier to handle the performance of your database.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Creating partition of database tables

    Creating range partition of table:

    Code:
    create table sales_data (production_year number(4),
                      products varchar2(10),
                      amount number(10,2))
         partition by range (production_year)
         partition part1 values less than (1992) tablespace Tab1,
         partition part2 values less than (1993) tablespace Tab2,
         partition part3 values less than (1994) tablespace Tab3,
         partition part4 values less than (1995) tablespace Tab4,
     partition part5 values less than (MAXVALUE) tablespace Tab5;
    The above created partition table shows that table has been partitioned into 5 segments according to production_year column of the table and continuously stored in different tablespaces through which the performance would be much better to access the table.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Creating partition of database tables

    Hash partitioning :

    hash partitioning of table provides the method to access the table according to their hash partitioned values.Using partition keys,the rows are mapped in the partition segments.

    To create the partition of the "Device_list" table using hash partitioning-

    Code:
    CREATE TABLE Device_list
     (Device_id NUMBER, Description VARCHAR2 (60))
    
             PARTITION BY HASH (Device_id)
             PARTITIONS 8
    STORE IN (tbs1, tbs2, tbs3, tbs4);

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Creating partition of database tables

    List partitioning :
    Using list partitioning ,you can control over the mapping of rows in the partition.
    it allows different order of data and unrelated collection of rows to be grouped together very easily.
    The statement below will create a list partition of table:

    Code:
    Create table students (student_id number(5),
                      Name varchar2(20),
                      Address varchar2(10,2),
                      City varchar2(20),
                      Fee_payment number(10,2))
                      Partition by list (city),
    Partition north_India values (‘DELHI’,’CHANDIGARH’),
    Partition east_India values (‘KOLKOTA’,’PATNA’),
    Partition south_India values (‘HYDERABAD’,’BANGALORE’,’CHENNAI’),
    Partition west India values (‘MUMBAI’,’GOA’);

Similar Threads

  1. Why is a tables in a database alisased ?
    By Vaikuntam in forum Software Development
    Replies: 4
    Last Post: 07-01-2011, 06:18 AM
  2. Creating tables for 3D production
    By Tionontati in forum Windows Software
    Replies: 6
    Last Post: 26-05-2010, 12:06 AM
  3. External Tables in database
    By Cayden in forum Software Development
    Replies: 4
    Last Post: 17-02-2010, 11:02 PM
  4. How to update two database tables coldfusion
    By Rixwel in forum Software Development
    Replies: 3
    Last Post: 10-08-2009, 03:13 PM
  5. Creating Tables in Java
    By RockOn in forum Software Development
    Replies: 3
    Last Post: 09-04-2009, 10:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,841,401.05692 seconds with 16 queries