Oracle District (2)

In front of us a brief introduction about the scope of the district: We continue on the following HASH partition, LIST Zoning

HASH Zoning:

Create:


create table student(
sid number primary key,
sname varchar2(20),
sdate date
)
partition by hash(sdate)
(
partition stu_part_01 tablespace part_01,
partition stu_part_02 tablespace part_02,
partition stu_part_03 tablespace part_03
)
storage(
initial 100k
NEXT 100k
minextents 2
maxextents 100
pctincrease 100
)



Insert the five data; we query:


SQL> select * from student partition(stu_part_01);

SID SNAME SDATE
---------- -------------------- -----------

1 a 2009-2-5
2 b 2009-2-5
5 a 2007-5-5

SQL> select * from student partition(stu_part_02);

SID SNAME SDATE
---------- -------------------- -----------

3 a 2005-2-5

SQL> select * from student partition(stu_part_03);

SID SNAME SDATE
---------- -------------------- -----------

4 a 2009-5-5




Next on: LIST Zoning


create table student(
sid number primary key,
sname varchar2(20),
sdate date,
department varchar2(20) check(department in(' Computer Science College ', ' faculty ',' The mathematical Institute ', ' physics and electronics '))
)
partition by list(department)
(
partition stu_part_01 values(' Computer Science College ', ' faculty ') tablespace part_01,
partition stu_part_02 values(' School of mathematics ') tablespace part_02,
partition stu_part_03 values(' College of physical and electronic ') tablespace part_03
)
storage(
initial 100k
NEXT 100k
minextents 2
maxextents 100
pctincrease 100
)




Insert the write data:

And then proceed to query: The result is


SQL> select * from student partition(stu_part_01);

SID SNAME SDATE DEPARTMENT
---------- -------------------- ----------- --------------------

1 a 2005-2-5 Computer Science College
2 b 2006-2-5 Faculty of Arts

SQL> select * from student partition(stu_part_02);

SID SNAME SDATE DEPARTMENT
---------- -------------------- ----------- --------------------

3 c 2004-2-5 School of mathematics

SQL> select * from student partition(stu_part_03);

SID SNAME SDATE DEPARTMENT
---------- -------------------- ----------- --------------------

4 d 2009-2-5 College of physical and electronic



Modification of the partition:

Zoning for the area we can pull sub-district, but we can increase partition hash partition

For example:

On a
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Oracle District (2)

  • ORACLE10G full version centos5 installed (the installation has passed)

    ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...

  • SGA extended the principle of 32bit oracle

    SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...

  • SQL optimization (4) - Table of the three connections

    Test the following three commonly used connection between the table: Sort - merge connected (sort-merge join, SMJ) Nested loops (nested loop, NL) Hash connection (hash join, HASH) 1. To create the test table SQL> select * from v $ version; BANNER ...

  • Dbms_obfuscation_toolkit use of Oracle's encryption and decryption of data (to)

    In order to protect sensitive data, oracle start from 8i to provide a data encryption package: dbms_obfuscation_toolkit. Take advantage of this package, our data can be DES, Triple DES or MD5 encryption. This article on the use of this and the use of ...

  • Oracle XDB relax resolve port conflict of 8080

    In this paper, carried: http://www.enet.com.cn/article/2008/0306/A20080306175452.shtml Oracle 9i from the start, Oracle includes the installation of the default XDB. After starting the database, Oracle XDB's http service will automatically take u ...

  • Oracle in the relationship between User and Schema

    If we want to know the database and the User What is the relationship between Schema, we must first know about User and Schema database What is the concept in the end. In SQL Server2000 in architecture because of the reason, User and Schema there is ...

  • High Availability Oracle Flashback

    Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...

  • An example of the use of TKPROF

    First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE

  • Diagnosis and principles of order

    SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...

  • ORACLE 10G dataguard configuration Step by Step

    oracle dataguard

Leave a Reply

Recent
Recent Entries
Tag Cloud
Random Entries
Latest Comments