Database Reference
In-Depth Information
That INSERT generated only about 220KB— kilobytes, not megabytes —of redo. The method I outline using the
V$MYSTAT view is useful in general for seeing the side effects of various options. The GET_STAT_VAL script is useful for
small tests, with one or two operations.
Can I Turn Off Redo Log Generation?
This question is often asked. The simple short answer is no, since redo logging is crucial for the database; it is not
overhead and it is not a waste. You do need it, regardless of whether you believe you do or not. It is a fact of life, and
it is the way the database works. If you turned off redo, then any temporary failure of disk drives, power, or a software
crash, would render the entire database unusable and unrecoverable. That said, however, there are some operations
that can be done without generating redo log in some cases.
as of oracle9 i release 2, a dBa can place the database into FORCE LOGGING mode. In that case, all operations
are logged. The query SELECT FORCE_LOGGING FROM V$DATABASE may be used to see if logging is going to be forced
or not. This feature is in support of data Guard, a disaster-recovery feature of oracle that relies on redo to maintain a
standby database copy.
Note
Setting NOLOGGING in SQL
Some SQL statements and operations support the use of a NOLOGGING clause. This does not mean that all operations
against the object will be performed without generating redo, just that some very specific operations will generate
significantly less redo than normal. Note that I said “significantly less redo,” not “no redo.” All operations will
generate some redo—all data dictionary operations will be logged regardless of the logging mode. The amount of
redo generated can be significantly less, however. For this example of the NOLOGGING clause, I ran the following in a
database running in ARCHIVELOG mode:
EODA@ORA12CR1> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
EODA@ORA12CR1> drop table t purge;
Table dropped.
EODA@ORA12CR1> variable redo number
EODA@ORA12CR1> exec :redo := get_stat_val( 'redo size' );
PL/SQL procedure successfully completed.
EODA@ORA12CR1> create table t
2 as
3 select * from all_objects;
Table created.
 
 
Search WWH ::




Custom Search