Partitioning
1 is suitable for processing large amount of data, such as TB class
2 to improve reading and writing and query speed of mega database
3 users can create tables by applying partitioning techniques to save data in a partitioned form
4 partitioning is the separation of large tables or indexes into relatively small, independently managed parts. The partitioned table does not differ from the unpartitioned table in the execution of the DML statement.
5 When partitioning a table, you must specify the partition that belongs to each record in the table, and which partition is determined by the partition table's matching field for that record.
A 6 partition field can be a field or a combination of multiple fields.
7 when the partition table determines that the user inserts an update or deletes the partition table, Oracle automatically chooses the storage access based on the value of the partition field.
8 When you create a partitioned table, you do not specify a partition name, and Oracle automatically names the partition.
Classification of partitioned Tables
Range Partitioning: Partitioning a range of values for a data table, using the partition by range clause.
Hash partition:
List partitions:
Combine range hash Partition:
Combine range list partitions:
create a range partition Table
CREATE TABLE Student_partition (
Sno VARCHAR2 (10),
Sname varchar2 (20),
Sage Number (2),
Score Number (2)
) partition by range (score) – Range partition table
(
Partition part1 values less than tablespace myspace,
Partition Part2 values less than tablespace myspace,
Partition Part3 values less than (MaxValue) tablespace users
);
INSERT into student_partition values (' 1 ', ' My name is Division 1 ', 12,55);
INSERT into student_partition values (' 2 ', ' My name is Division 1 ', 12,56);
INSERT into student_partition values (' 3 ', ' My name is Division 2 ', 12,76);
INSERT into student_partition values (' 4 ', ' My name is Division 3 ', 12,86);
Explain:
Partition by range (score) – Range partition table
Range (Score): Partitioning by socre column
Part1: Name of partition
Tablespace MySpace: Specify the storage table space for the part1 partition
query the data within the partition
SELECT * from Student_partition partition (part1);
SELECT * from Student_partition partition (part2);
SELECT * from Student_partition partition (PART3);