Oracle super large database table partitions only composite partition tables (range hash partition table)

Source: Internet
Author: User

Oracle super large database table partitions only composite partition tables (range hash Partition table) [SQL] create table graderecord04 (sno varchar2 (10), sname varchar2 (20), dormitory varchar2 (3 ), grade int) partition by range (grade) subpartition by hash (sno, sname) (partition p1 values less than (75) (subpartition sp1 tablespace test01, subpartition sp2 tablespace test02 ------ specify the location of the tablespace), partition p2 values less than (maxvalue) (subpartition sp3 tablespace test02, su Bpartition sp4 tablespace test03 ------- specify the location of the tablespace); SQL> create table graderecord04 2 (3 sno varchar2 (10), 4 sname varchar2 (20), 5 dormitory varchar2 (3 ), 6 grade int 7) 8 partition by range (grade) 9 subpartition by hash (sno, sname) 10 (11 partition p1 values less than (75) 12 (13 subpartition sp1 tablespace test01, subpartition sp2 tablespace test02 14), 15 partition p2 values less than (maxval Ue) 16 (17 subpartition sp3 tablespace test02, subpartition sp4 tablespace test03 18) 19); Table created. SQL> insert into graderecord04 values ('201312', 'ku', '000000', 92); insert into graderecord04 values ('20170101', 'OK', '2016 ', 62); insert into graderecord04 values ('20160301', 'east', '20160301', 26); insert into graderecord04 values ('20160301', 'liang', '20160301 ', 77); insert into graderecord04 values ('20170101', 'jing', '20170101', 47); ins Ert into graderecord04 (sno, sname, dormitory) values ('000000', 'feng', '000000'); insert into graderecord04 values ('20140901', 'ming ', '000000', 90); insert into graderecord04 values ('000000', 'nan', '000000', 240); insert into graderecord04 values ('000000', 'Tao ', '20140901', 67); insert into graderecord04 values ('20160901', 'bo', '20160901', 75); insert into graderecord04 values ('20160301', 'hangzhou ', '20140901', 60); insert into graderecord04 values ('20140901 ', 'Bew', '000000', 72); insert into graderecord04 values ('000000', 'je', '000000', 88); insert into graderecord04 values ('2016 ', 'wilde', '20170101', 19); insert into graderecord04 values ('20170101', '20170101', 65); insert into graderecord04 values ('20160301 ', 'dan', '000000', 59); insert into graderecord04 values ('000000', '000000', 95); select * from graderecord04 partition (p1 ); select * from graderecord04 partition (p2); select * from Graderecord04 subpartition (sp1); select * from graderecord04 subpartition (sp2); select * from graderecord04 subpartition (sp3); SQL> select * from graderecord04; sno sname dor grade ---------- -------------------- --- ---------- 511602 ??? 229 62511605 ??? 228 47511609 ??? 240 67511612 ??? 244 72511614 ??? 244 19511615 ??? 244 65511602 ??? 229 62511605 ??? 228 47511609 ??? 240 67511612 ??? 244 72511614 ??? 244 19SNO sname dor grade ---------- ------------------ --- ---------- 511615 ??? 244 65511603 ??? 229 26511611 ??? 240 60511616 ??? 244 59511603 ??? 229 26511611 ??? 240 60511616 ??? 244 59511604 ??? 228 77511606 ??? 228511607 ??? 240 90511613 ??? 244 88SNO sname dor grade ---------- ------------------ --- ---------- 511604 ??? 228 77511606 ??? 228511607 ??? 240 90511613 ??? 244 88511601 ??? 229 92511608 ??? 240 100511610 ??? 240 75511617 ??? 244 95511601 ??? 229 92511608 ??? 240 100511610 ??? 240 75SNO sname dor grade ---------- ------------------ --- ---------- 511617 ??? 244 9534 rows selected. SQL> select * from graderecord04 partition (p1); SNO SNAME DOR GRADE ---------- -------------------- --- ---------- 511602 ??? 229 62511605 ??? 228 47511609 ??? 240 67511612 ??? 244 72511614 ??? 244 19511615 ??? 244 65511602 ??? 229 62511605 ??? 228 47511609 ??? 240 67511612 ??? 244 72511614 ??? 244 19SNO sname dor grade ---------- ------------------ --- ---------- 511615 ??? 244 65511603 ??? 229 26511611 ??? 240 60511616 ??? 244 59511603 ??? 229 26511611 ??? 240 60511616 ??? 244 5918 rows selected. SQL> select * from graderecord04 partition (p2); SNO SNAME DOR GRADE ---------- -------------------- --- ---------- 511604 ??? 228 77511606 ??? 228511607 ??? 240 90511613 ??? 244 88511604 ??? 228 77511606 ??? 228511607 ??? 240 90511613 ??? 244 88511601 ??? 229 92511608 ??? 240 100511610 ??? 240 75SNO sname dor grade ---------- ------------------ --- ---------- 511617 ??? 244 95511601 ??? 229 92511608 ??? 240 100511610 ??? 240 75511617 ??? 244 9516 rows selected. SQL> select * from graderecord04 subpartition (sp1); SNO SNAME DOR GRADE ---------- ------------------ --- ---------- 511602 ??? 229 62511605 ??? 228 47511609 ??? 240 67511612 ??? 244 72511614 ??? 244 19511615 ??? 244 65511602 ??? 229 62511605 ??? 228 47511609 ??? 240 67511612 ??? 244 72511614 ??? 244 19SNO sname dor grade ---------- ------------------ --- ---------- 511615 ??? 244 6512 rows selected. SQL> select * from graderecord04 subpartition (sp2); SNO SNAME DOR GRADE ---------- ------------------ --- ---------- 511603 ??? 229 26511611 ??? 240 60511616 ??? 244 59511603 ??? 229 26511611 ??? 240 60511616 ??? 244 596 rows selected. SQL> select * from graderecord04 subpartition (sp3); SNO SNAME DOR GRADE ---------- -------------------- --- ---------- 511604 ??? 228 77511606 ??? 228511607 ??? 240 90511613 ??? 244 88511604 ??? 228 77511606 ??? 228511607 ??? 240 90511613 ??? 244 888 rows selected. SQL> select * from graderecord04 subpartition (sp4); SNO SNAME DOR GRADE ---------- ------------------ --- ---------- 511601 ??? 229 92511608 ??? 240 100511610 ??? 240 75511617 ??? 244 95511601 ??? 229 92511608 ??? 240 100511610 ??? 240 75511617 ??? 244 958 rows selected. SQL>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.