Skip to Main Content
  • Questions
  • Data dictionary impact of creating and deleting tables

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Noob.

Asked: August 21, 2017 - 1:04 pm UTC

Last updated: August 21, 2017 - 3:07 pm UTC

Version: 11.2.0.4.0

Viewed 1000+ times

You Asked

Hi Tom!

Could creating and deleting tables in warehouse many times (20000 per day during 1-2 years) damage data dictionary and dramatically decrease performance? If yes how we can restore it?

Thank you

and Chris said...

Are you really running "create table" and "drop table" statements 20,000+ times per day?!

I'm not aware of this "damaging the data dictionary". But then, I've never seen this happen in practice.

I know other databases support (encourage?) creating temp tables on-the-fly and removing them again. But in Oracle Database this is "doing it wrong". There's a lot of overhead in creating and dropping tables. Plus this is DDL, so commits, possibly breaking your transactions.

Instead, you should create permanent tables. And insert+delete from them as needed. If you need the data to be session specific, create them as "global temporary" tables.

If you have a specific performance issue you're struggling with, please post details of:

- Your SQL statement(s)
- The execution plan(s)
- Details about how slow it is, how fast you need it to be etc.

For instructions on how to get an execution plan, read:

https://blogs.oracle.com/sql/how-to-create-an-execution-plan



Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Design

New to good database design? Check out Chris Saxon's full fundamentals class.