Any advantage of creating table in temporary tablespace – Oracle

oracletablespaces

My on-site DBA told me to create the particular table on temporary tablespace.Is there any advantage of such action?

Best Answer

I believe your DBA told you to use temporary tablespace for temporary data? If so using temporary tables have the following advantages:

  • DML on temporary tables does not generate redo. If one uses direct path INSERT (INSERT /*+ append */, CTAS) then undo is also not generated. On 12c it is possible to store UNDO in temporary tablespace as well!
  • after session crash Oracle will take care to remove your data
  • after instance crash temporary tables do not require recover

Of course I forgot something. :) People will add more advantages in comments.

While listing advantages I am not considering scenario when you have to preserve data between restarts.

Database Concepts about Temporary Tables