Diasable redo log for the table

I have a table which is heavily inserted with data periodically and goes to the order of 5G over the period of 20days and then it is cleaned by trigger. So given point of time it holds only last 20days worth of data.
Question is I want to disable the redo log for this table so that when I recover the database I can skip this table as the data is not critical to recover and we can improve the recovery time by skipping it.

What is the best way to do it, I know there is NOARCHIVELOG option I can set, but according to ORacle documentation that one still generates logs and not reliable.

Any ideas?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
you cannot disable redo log at all.
NOARCHIVELOG only avoids dumping out the redo log into .arc files (for recovery), but that's all.

the only thing you can do is ensure that the redo logs are big enough, that you have a couple of them, and that they are located on the fastest disks on your sever.
You can disable redo log for a table by changing it to nologging mode:

C:\downloads\script>sqlplus "/ as sysdba"

SQL*Plus: Release - Production on Mon Mar 20 15:47:02 2006

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release - Production
With the Partitioning, OLAP and Data Mining options

SQL> create table amittest as select * from v$session;

Table created.

SQL> alter table amittest nologging;

Table altered.


This will help, but for it to be effective, the tablespace it is in also must be a 'nologging' tablespace (otherwise the tablespace logs). And not all DML will operate in loglogging mode, there are a lot of restrictions in getting this to work (we struggled with this on our data warehouse). In fact, updates and deletes to NOT honor nologging.

For inserts, you need to force the insert to be a direct-path insert by using the
insert /*+ append */  hint on the insert.

Per the manual:
Only the following operations support the NOLOGGING mode for DML:
Direct-path INSERT (serial or parallel)
Direct Loader (SQL*Loader)

I'm afraid for this delete/cleanup, there isn't much you can do. You COULD consider doing a direct-path insert to a new table of all the columns you want, then doing a truncate of the table, and rename the tables. This won't help if you have referential integrity constraints pointing to the table...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Mark GeerlingsDatabase AdministratorCommented:
When you say that after 20 days the data in this table is: "cleaned by trigger" how is that done, with a "delete..." command?  If so, and if you have Oracle's Enterprise Edition, you could partition this table, then simply drop an entire partition when the data is no longer needed.  That will go much faster and generate *MUCH* less redo, at least for the delete.

You also indicated that NOARCHIVELOG is unreliable.  I disagree, it may not be as thorough as you would like, since NOARCHIVELOG only applies to certain types of inserts and/or data loads, but I have always found it to be reliable in those cases.
shasta123Author Commented:
I have not forgotten your replies, trying to digest them all.
shasta123Author Commented:
Sorry for the late reply, but our table is not loaded once in bulk so that i could use the direct path serial load.

It is a table which is inserted by a server process periodically? How do i skip the redo for this table so that for recovery i can skip this table ?
Mark GeerlingsDatabase AdministratorCommented:
Does your "server process" that does the inserts use this syntax: "insert into [table_name] ... select ... from [some other table(s) or view(s)]"?

If not, and you can't use a direct path load either, then no, you cannot disable redo logiing for this table.

What does your "server process" look like?  Is it a stored procedure?
Also, if you are only inserting one or two records, you wouldn't want to use direct path. It only makes sense if you are really doing a bulk insert.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.