I was googling for things related to NOLOGGING operations and found this useful post on the Ask Tom web site: url
There is a nice table in the post that shows when insert operations generate redo log activity. But it isn’t formatted very well so I thought I would format the table here so it lines up better.
Table Mode Insert Mode ArchiveLog mode result ----------- ------------- ----------------- ----------- LOGGING APPEND ARCHIVE LOG redo generated NOLOGGING APPEND ARCHIVE LOG no redo LOGGING no append "" redo generated NOLOGGING no append "" redo generated LOGGING APPEND noarchive log mode no redo NOLOGGING APPEND noarchive log mode no redo LOGGING no append noarchive log mode redo generated NOLOGGING no append noarchive log mode redo generated
All of this is from Ask Tom. My contribution here is just the formatting.
I ran a couple of tests whose results agree with this table. I ran insert append on a database that was not in archivelog mode and the insert ran for the same amount of time with the table set for LOGGING as it did with the table set for NOLOGGING. I ran the same test on a database that is in archivelog mode and saw a big difference in run time between LOGGING and NOLOGGING. I didn’t prove it but I assume that the redo generation caused the difference in run time.
No archivelog and logging:
insert /*+append*/ into target select * from source; 64000 rows created. Elapsed: 00:00:00.36
No archivelog and nologging:
insert /*+append*/ into target select * from source; 64000 rows created. Elapsed: 00:00:00.38
Archivelog and logging:
insert /*+append*/ into target select * from source; 64000 rows created. Elapsed: 00:00:00.84
Archivelog and nologging:
insert /*+append*/ into target select * from source; 64000 rows created. Elapsed: 00:00:00.53
I haven’t tested all the table options but I thought it was worth formatting for my reference and for others who find it useful.
Bobby
Pingback: Estimating how much write I/O is not logged | Bobby Durrett's DBA Blog
Pingback: Impact of Force Logging | Bobby Durrett's DBA Blog