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

How to manage data Warehouse with oracle automatic Partition

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to use oracle automatic partition to manage the data warehouse. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

1. Why use automatic partitioning?

Before oracle11g, oracle does not support automatic partitioning, which may cause our system to see if the partition is created or write trigger to create a partition after running for a period of time, otherwise it will cause the data to be unable to be stored or a large amount of data will go into the default partition. Maintenance is error-prone and complex. However, oracle11g has been partitioned automatically through interval, which makes our system more comfortable when using the partitioning function.

two。 How do I create a partition automatically?

Oracle itself provides a variety of functions to create partitions, such as creating partitions while creating tables, or creating partitions to import data, and defining partitions online or online. In this article, I mainly introduce how to create partitions automatically in range mode.

3. Create a partition concrete instance

CREATE TABLE "T_PART_TABLE" ("ID" VARCHAR2 (64), "PERSOID" NUMBER, "CODE" VARCHAR2 (64), "NAME" VARCHAR2 (64), "DEPT" VARCHAR2 (64), "LOG_TIME" NUMBER, "LOG_TYPE" NUMBER, "CONTENT" VARCHAR2 (1024), "RESULT" VARCHAR2 (2), "SN" VARCHAR2 (128), "DEPT_ID" NUMBER, "BLACK_FLAG" VARCHAR2 (2 BYTE) "CREATE_TIME" Date) PARTITION BY RANGE (CREATE_TIME) interval (numtodsinterval (1)) (PARTITION part_p180613 VALUES LESS THAN (TO_DATE ('2018-6-13),' yyyy-mm-dd') COMMENT ON COLUMN "T_PART_TABLE". "ID" IS 'primary key'

COMMENT ON COLUMN "T_PART_TABLE". "PERSOID" IS 'id'

COMMENT ON COLUMN "T_PART_TABLE". "CODE" IS 'Encoding'

COMMENT ON COLUMN "T_PART_TABLE". "NAME" IS 'name'

COMMENT ON COLUMN "T_PART_TABLE". "DEPT" IS 'department'

COMMENT ON COLUMN "T_PART_TABLE". "LOG_TIME" IS 'log time'

COMMENT ON COLUMN "T_PART_TABLE". "LOG_TYPE" IS 'type'

COMMENT ON COLUMN "T_PART_TABLE". "CONTENT" IS 'content'

COMMENT ON COLUMN "T_PART_TABLE". "RESULT" IS''

COMMENT ON COLUMN "T_PART_TABLE". "SN" IS 'certificate sn'

COMMENT ON COLUMN "T_PART_TABLE". "DEPT_ID" IS 'department id'; CREATE INDEX "T_PART_TABLE_PK" ON "T_PART_TABLE" ("ID") local; ALTER TABLE "T_PART_TABLE" MODIFY ("ID" NOT NULL ENABLE); the above is the editor for you to share how to use oracle automatic partition management data warehouse, if you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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

Servers

Wechat

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

12
Report