Writen by
Devil
1:02 AM
-
0
Comments
Hash partitioning:
Syntax for Hash partitioning
CREATE TABLE products
(PRDNO NUMBER,
Description VARCHAR2 (60))
PARTITION BY HASH (partno)
PARTITIONS 4
STORE IN (tab1, tab2, tab3, tab4);
Above example creates a hash-partitioned table, The partitioning column is PRDNO, four partitions are created and assigned system generated names, and they are placed in four named tablespaces (tab1, tab2, …).
- It is used if data does not easily lend itself to range partitioning, but you would like to partition for Performance and manageability reasons.
- It provides a method of evenly distributing data across a Specified number of partitions.
- Rows are mapped into partitions based on a hash value of the partitioning key
Syntax for Hash partitioning
CREATE TABLE products
(PRDNO NUMBER,
Description VARCHAR2 (60))
PARTITION BY HASH (partno)
PARTITIONS 4
STORE IN (tab1, tab2, tab3, tab4);
Above example creates a hash-partitioned table, The partitioning column is PRDNO, four partitions are created and assigned system generated names, and they are placed in four named tablespaces (tab1, tab2, …).
No comments
Post a Comment