I need to tell to Oracle database that do not use the rollback SQL
command to accelerate the delete command. I use databases in development
process and I don't need to rollback the inserts, updates and deletes. I
want to accelerate my sql queries and I think if I deactivate the
rollback command I'll win in speed.
Thank you very much.
Rollback is not only used for rolling back but also for guaranteeing
that a query of another user sees the database as it is at the start
of the query: of all blocks that change during the runtime of the
query the original data is retrieved from the rollback the updating
processes have generated.
Jaap.
Thanks.
En/Na "Jaap W. van Dijk" ha escrit:
with the exception of a very few commands -- yes. You might believe you don't
"need to rollback" but you do.
Suppose you were in the middle of a DELETE and the system failed. If we didn't
have rollback for it -- you would have a corrupt database, you lose
there are some commands that will bypass undo and redo generate, like a direct
path insert (insert /*+ append */ into t select ...), create table as select
nologging, create index nologging, but in general, all insert/update/delete
activity will generate undo.
--
Thomas Kyte (tk...@us.oracle.com) http://asktom.oracle.com/
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/
Opinions are mine and do not necessarily reflect those of Oracle Corp
Jaap.
no, non-logged operations do not need to generate undo either.
They typically work by performing their duties ABOVE the high water mark or in
temp segments that will be converted into real ones later. To "undo" them, we
just reset the high water mark.
Consider:
ops$tk...@ORA817DEV.US.ORACLE.COM> create rollback segment rbs_small tablespace
system
2 storage ( initial 32k next 32k minextents 2 maxextents 2 );
Rollback segment created.
ops$tk...@ORA817DEV.US.ORACLE.COM> alter rollback segment rbs_small online;
Rollback segment altered.
ops$tk...@ORA817DEV.US.ORACLE.COM> drop table t;
Table dropped.
ops$tk...@ORA817DEV.US.ORACLE.COM> create table t as select * from all_objects
where 1=0;
Table created.
ops$tk...@ORA817DEV.US.ORACLE.COM> set transaction use rollback segment
rbs_small;
Transaction set.
ops$tk...@ORA817DEV.US.ORACLE.COM> insert into t select * from all_objects;
insert into t select * from all_objects
*
ERROR at line 1:
ORA-01562: failed to extend rollback segment number 7
ORA-01628: max # extents (2) reached for rollback segment RBS_SMALL
ops$tk...@ORA817DEV.US.ORACLE.COM> drop table t;
Table dropped.
ops$tk...@ORA817DEV.US.ORACLE.COM> create table t as select * from all_objects
where 1=0;
Table created.
ops$tk...@ORA817DEV.US.ORACLE.COM> set transaction use rollback segment
rbs_small;
Transaction set.
ops$tk...@ORA817DEV.US.ORACLE.COM> insert /*+ APPEND */ into t select * from
all_objects;
17155 rows created.
ops$tk...@ORA817DEV.US.ORACLE.COM>
The first "logged" insert fails due to insufficient RBS space. The second one,
in the same RBS works....
When a table or index has NOLOGGING set, neither parallel nor serial
direct-load INSERT operations generate undo or redo logs.
In all other places of documentation that talks about nologging,
there's no mention of no undo.
Question for Tom: The create table statement does not have
"nologging". No "alter table t nologging" follows. How can t be
nologging, even though insert /*+ append */ is used?
Yong Huang
yon...@yahoo.com
Thomas Kyte <tk...@us.oracle.com> wrote in message news:<a3k2k...@drn.newsguy.com>...
I guess the "logging/nologging" option will be ignored when database
in noarchivelog mode. But I can't find any documents about this.
Thanks,
Mike
If you are deleting all rows in a table use trunc instead.
Yours Hans Erik Busk
t...@cn.stam.dk
"Artur Undebarrena" <aundeb...@ictnet.es> wrote in message
news:3C5D43ED...@ictnet.es...