Logging Clause
Oracle allows LOGGING or NOLOGGING clause during object creation or modification of an existing object. By default logging mode is enabled. LOGGING mode will log everything in a redo log whereas NOLOGGING will escape to write the changes into the redo log file, thus it is less I/O operations.
Each mode has its own advantages and disadvantages. You can’t recover if there is a crash with a nologging mode. However, nologging will speedup your DML and DDL operation.Why is it faster? It is faster because it does not write the change to a redo log. You should know when to pick nologging to get the most out of it. Remember, you can also apply this mode at tablespace level too.
NOLOGGING SYNTAX
CREATE TABLE employee
(
id NUMBER,
fname VARCHAR2
)
nologging;
ALTER TABLE employee nologging;
Insert /*+APPEND*/..
ALTER INDEX my_idx nologging;
Caution:
It is recommended that you make a backup of an object before performing the nologging operations.
Interested in working with me? I can be reached at pbaniya04[at]gmail.com for any questions, consulting opportunities or you may drop a line to say HELLO. Thank your again for visiting my blog and looking forward to serving you more.
Have a Database-ious Day!
Have a Database-ious Day!
No comments