oracle快速删除1000万数据,怎么快速删除4000多万条重复的记录????

贴上表结构:

create table OCR_DB.BAR_QST_PROD

(

HEAD_SN     VARCHAR2(20) not null,

TEST_TIME   DATE not null,

PROJ_CODE   VARCHAR2(8) not null,

UP_DN       CHAR(2),

TESTER      VARCHAR2(10) not null,

RESULT      VARCHAR2(4) not null,

CREATE_USER VARCHAR2(16) not null,

CREATE_TIME DATE not null,

MODIFY_USER VARCHAR2(16) not null,

MODIFY_TIME DATE not null,

TESTVALUE   OCR_DB.MESUREITEM,

ISTOHGA     CHAR(1),

WEEK        INTEGER default to_number(to_char(sysdate,'ww')) not null

)

partition by range (WEEK)

(

partition BAR_QST_PROD_P1 values less than (2)

tablespace BAR_QST_PROD_TS1

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P2 values less than (3)

tablespace BAR_QST_PROD_TS2

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P3 values less than (4)

tablespace BAR_QST_PROD_TS3

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P4 values less than (5)

tablespace BAR_QST_PROD_TS4

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P5 values less than (6)

tablespace BAR_QST_PROD_TS5

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P6 values less than (7)

tablespace BAR_QST_PROD_TS6

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P7 values less than (8)

tablespace BAR_QST_PROD_TS7

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P8 values less than (9)

tablespace BAR_QST_PROD_TS8

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P9 values less than (10)

tablespace BAR_QST_PROD_TS9

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P10 values less than (11)

tablespace BAR_QST_PROD_TS10

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P11 values less than (12)

tablespace BAR_QST_PROD_TS11

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P12 values less than (13)

tablespace BAR_QST_PROD_TS12

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P13 values less than (14)

tablespace BAR_QST_PROD_TS1

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P14 values less than (15)

tablespace BAR_QST_PROD_TS2

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P15 values less than (16)

tablespace BAR_QST_PROD_TS3

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P16 values less than (17)

tablespace BAR_QST_PROD_TS4

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P17 values less than (18)

tablespace BAR_QST_PROD_TS5

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P18 values less than (19)

tablespace BAR_QST_PROD_TS6

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P19 values less than (20)

tablespace BAR_QST_PROD_TS7

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P20 values less than (21)

tablespace BAR_QST_PROD_TS8

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P21 values less than (22)

tablespace BAR_QST_PROD_TS9

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P22 values less than (23)

tablespace BAR_QST_PROD_TS10

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P23 values less than (24)

tablespace BAR_QST_PROD_TS11

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P24 values less than (25)

tablespace BAR_QST_PROD_TS12

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P25 values less than (26)

tablespace BAR_QST_PROD_TS1

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P26 values less than (27)

tablespace BAR_QST_PROD_TS2

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P27 values less than (28)

tablespace BAR_QST_PROD_TS3

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P28 values less than (29)

tablespace BAR_QST_PROD_TS4

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P29 values less than (30)

tablespace BAR_QST_PROD_TS5

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P30 values less than (31)

tablespace BAR_QST_PROD_TS6

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P31 values less than (32)

tablespace BAR_QST_PROD_TS7

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P32 values less than (33)

tablespace BAR_QST_PROD_TS8

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P33 values less than (34)

tablespace BAR_QST_PROD_TS9

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P34 values less than (35)

tablespace BAR_QST_PROD_TS10

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P35 values less than (36)

tablespace BAR_QST_PROD_TS11

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P36 values less than (37)

tablespace BAR_QST_PROD_TS12

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P37 values less than (38)

tablespace BAR_QST_PROD_TS1

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P38 values less than (39)

tablespace BAR_QST_PROD_TS2

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P39 values less than (40)

tablespace BAR_QST_PROD_TS3

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P40 values less than (41)

tablespace BAR_QST_PROD_TS4

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P41 values less than (42)

tablespace BAR_QST_PROD_TS5

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P42 values less than (43)

tablespace BAR_QST_PROD_TS6

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P43 values less than (44)

tablespace BAR_QST_PROD_TS7

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P44 values less than (45)

tablespace BAR_QST_PROD_TS8

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P45 values less than (46)

tablespace BAR_QST_PROD_TS9

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P46 values less than (47)

tablespace BAR_QST_PROD_TS10

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P47 values less than (48)

tablespace BAR_QST_PROD_TS11

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P48 values less than (49)

tablespace BAR_QST_PROD_TS12

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P49 values less than (50)

tablespace BAR_QST_PROD_TS1

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P50 values less than (51)

tablespace BAR_QST_PROD_TS2

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P51 values less than (52)

tablespace BAR_QST_PROD_TS3

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P52 values less than (53)

tablespace BAR_QST_PROD_TS4

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P53 values less than (54)

tablespace BAR_QST_PROD_TS5

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

),

partition BAR_QST_PROD_P54 values less than (55)

tablespace BAR_QST_PROD_TS6

pctfree 2

initrans 1

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

)

);

-- Create/Recreate check constraints

alter table OCR_DB.BAR_QST_PROD

add check (UP_DN IN ('UP','DN'));

-- Create/Recreate indexes

create index OCR_DB.IDX_BAR_QST_PROD_CREATE_TIME on OCR_DB.BAR_QST_PROD (CREATE_TIME);

create index OCR_DB.IDX_BAR_QST_PROD_TEST_TIME on OCR_DB.BAR_QST_PROD (TEST_TIME);

create index OCR_DB.IDX_HEADSN on OCR_DB.BAR_QST_PROD (HEAD_SN)

tablespace TBS_IDX_BAR_QST_PROD

pctfree 10

initrans 2

maxtrans 255

storage

(

initial 64K

next 1M

minextents 1

maxextents unlimited

);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值