First range-hash partition. Let's say that the list partition does not support multiple columns, but the range and hash partitions support multiple columns.
Code as follows: SQL codeCreateTableGraderecord (Sno varchar2), sname varchar2 (a), dormitory varchar2 (3), Gradeint) partition byRange (grade) Subpartition byHash (sno,sname) (partition P1ValuesLess than (subpartition sp1,subpartition SP2), partition P2ValuesLess Than (MaxValue) (subpartition sp3,subpartition SP4));
The range is divided into grade, then the SNO and sname are partitioned, and the hash partitioning tends to be "average" when the data volume is large.
Inserting data: SQL codeInsert intoGraderecordValues(' 511601 ', ' Qui-gon ', ' 229 ', 92);Insert intoGraderecordValues(' 511602 ', ' Kay ', ' 229 ', 62);Insert intoGraderecordValues(' 511603 ', ' East ', ' 229 ', 26);Insert intoGraderecordValues(' 511604 ', ' light ', ' 228 ', 77);Insert intoGraderecordValues(' 511605 ', ' respect ', ' 228 ', 47);Insert intoGraderecord (Sno,sname,dormitory)Values(' 511606 ', ' PK ', ' 228 ');Insert intoGraderecordValues(' 511607 ', ' Ming ', ' 240 ', 90);Insert intoGraderecordValues(' 511608 ', ' nan ', ' 240 ', 100);Insert intoGraderecordValues(' 511609 ', ' Tao ', ' 240 ', 67);Insert intoGraderecordValues(' 511610 ', ' bo ', ' 240 ', 75);Insert intoGraderecordValues(' 511611 ', ' 铮 ', ' 240 ', 60);Insert intoGraderecordValues(' 511612 ', ' Beaver ', ' 244 ', 72);Insert intoGraderecordValues(' 511613 ', ' Jay ', ' 244 ', 88);Insert intoGraderecordValues(' 511614 ', ' wilt ', ' 244 ', 19);Insert intoGraderecordValues(' 511615 ', ' rustic ', ' 244 ', 65);Insert intoGraderecordValues(' 511616 ', ' Dan ', ' 244 ', 59);Insert intoGraderecordValues(' 511617 ', ' Jin ', ' 244 ', 95);
queries are as follows: SQL code Select * from graderecord partition (p1); select * from graderecord partition (p2); select * from graderecord subpartition (SP1); select * from graderecord subpartition (SP2);