如何使DELETE 语句不产生REDO LOG?

[复制链接]
查看11 | 回复9 | 2005-10-30 17:05:33 | 显示全部楼层 |阅读模式
请教各位大峡:
我有一个ARCH的DATABASE,其中一个TABLE要经常做DELETE动作,但会因此而产生大量的REDO LOG而塞满我的硬盘,不知有什么好办法没有?望各位指教!
注:我已使该ALTER TABLE TABLENAME NOLOGGING了!
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
没有办法
把你的archivelog方式改称noarchivelogOnly if 你为磁盘空间犯愁
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
nologging对一般的DML操作是不起作用的。谁知道解决办法?我也想知道


回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
NOLOGGING only affects some DML and DDL commands; for example, direct loads.
如果将temp表空间设置为NOLOGGING,那有什么作用??
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
It would be a major change to ALL TRANSACTIONAL SYSTEMS.
You do not want what you ask for (trust me, you don't).
Suppose the delete "failed" halfway through (constraint violation, system
failure, whatever).Now what do you have?Total, 100% loss of data integrity
-- that is what.
In order to do what you want (sort of), I generally recommand:
create table as select-- using paralle and
unrecoveral.
direct path load or insert /*+ append */ (same thing basically) the new data
index in parallel, with unrecoverable as well
drop the old table
rename the new table
BACKUP
There you go -- very fast, very efficient -- results in "compact data" (whereas
a delete would leave lots of free space).No logging, no undo -- just what you
think you need.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
Disable logging on that table:
alter table t1 nologging;
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
did u see the first post?


回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
Sorry, I didn't read it carefully.
In Oracle document, set a table to nologging mode, couldn't avoid logging totally.
Maybe you can try this (I'm not sure):
alter table t1 unrecoverable;
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
Do you have index on that table? If there is, You may change the index to nologging mode.
alter index i1 nologging.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
if, that means oracle is not the qualified db,right?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行