Get the App
SLTechnology News&Howtos  ›  Database  › 

Usage of oracle Table Partition and Index Partition

Shulou Source: shulou.com Published: 2022-05-31 18:39:47 10月02日 Update

This article introduces the relevant knowledge of "oracle table partition and index partition usage". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

Oracle is a database management system that supports physical partitions and is said to be the first to support it! following advantages

1: Reduce maintenance workload, managing each partition independently is simpler than managing a large single partition

2: Enhanced data availability, one partition bad does not affect all data

3: Improve query speed

4: Balanced I/O

Create a table partition

create table ware_retail_part

(

id integer primary key,

retail_date date,

ware_name varchar2(50)

)

partition by range(retail_date)

(

partition par_01 values less than(to_date('2011-04-01','yyyy-mm-dd')),

partition par_02 values less than(to_date('2011-07-01','yyyy-mm-dd')),

partition par_03 values less than(to_date('2011-10-01','yyyy-mm-dd')),

partition par_04 values less than(to_date('2012-01-01','yyyy-mm-dd'))

);

You can also use multiple as range objects

Hash partition (HASH partition)

It is difficult to distinguish between range queries and inequality queries.

create

create table ware_retail_part3

(

id integer primary key,

retail_date date,

ware_name varchar2(50)

)

storage(initial 2048k) --Specifies the initialization space size of the table partition

partition by hash(id)

(

partition par_01 tablespace tmp_01,

partition par_02 tablespace tmp_02

);

list partitioning

Keyword LIST

A column of a table can be enumerated and partitioned with a list

create table ware_retail_part3

(

id integer primary key,

name varchar2(50),

province varchar2(20)

)

partition by list(province)

(

partition shandong values Shandong Province '),

partition shenzhen values ('shenzhen '),

partition jiangjiang values ('Jiujiang province')

);

"Oracle table partition and index partition usage" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Data query management index content more knowledge scope support practicality equilibrium achievement and then inequalities advantages functions keys keywords usability dilemma Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Huawei Microsoft Docker OPPO Reno