Database Administration (MOSC)

MOSC Banner

Proper way in truncating very large tables

edited Dec 16, 2018 4:08AM in Database Administration (MOSC) 10 commentsAnswered ✓

Hi all, would want to get some advice or tips on truncating very large tables about 30mil rows.

This is a log table and my application guys decided that they do not want to keep the data in this table hence requested me to truncate it.

However to my understanding, truncating such a large table will take very long time and could impact the running database. Is there any other way on doing it?

I was thinking to rename the existing table & creating a duplicated table by using (CREATE TABLE A_NEW AS SELECT * FROM A WHERE 1=0;)since this would create an empty table with the same structure. I'll then schedule a time to drop the old table all together. Is this workable? What is the impact of doing this way? Will I need to recreated the associated views/indexs/ other objects?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center