Latest News

Monday, December 11, 2017

Table Partitioning by List

List Partitioning: 

  • It is used when it's required to have explicit control over how rows map to partitions. 
  • It can have list  of discrete values for the partitioning column in the description for each partition. 
  • This is different from range partitioning, where a range of values is associated with a partition, and from hash partitioning, where the user has no control of the row to Partition mapping.
  • List partitioning allows unordered and unrelated sets of data to be grouped and organised together very naturally.


Syntax for list partitioning:

 Create table customers (custcode number (5),
Name varchar2 (20),
Addr varchar2 (10,2),
City varchar2 (20),
Bal 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 (‘BOMBAY’,’GOA’);


If a row is inserted in the above table then oracle maps the value of city column and whichever partition list matches the city column the row is stored in that partition.
  • Google+
  • Pinterest
« PREV
NEXT »

No comments

Post a Comment