Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Usage of oracle Table Partition and Index Partition

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report