What is the fastest way to copy data from one oracle table to another

I need to duplicate a table, what is the fastest way?
U4enikAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

kuknoCommented:
CREATE TABLE new_table AS SELECT * FROM old_table;
0

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
U4enikAuthor Commented:
Thanks, but sorry, I didn't tell that before, the old table doesn't have indexes, and the new one should have some.

And this is a batch job that should be executed once per day.

So is it rational to recreate table and indexes each time? Or is it better to create a table with indexes once and then just empty it and fill it?
0
kuknoCommented:
O.K. I think you should explain why you want to copy the table?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

U4enikAuthor Commented:
I need to copy it because I need to run a query on it that needs indexes and I can't set indexes on original table.
0
SujithData ArchitectCommented:
How big is the table?
rows and size?
0
U4enikAuthor Commented:
it is 600 000 rows, here is one row example

1 300 0002 FSEE0070000289      F0133867      N 43 2003 A1080501 000 KBUS EEK 0000 -542979,00 -542979,00
-2979,00      -542979,00 000000000000 0
0
SujithData ArchitectCommented:
Its relatively a small table.
I would go for having a second table, truncating and loading each time rather than creating a second table every time.

You may use APPEND hint to speed up the load.

insert /*+ APPEND */ into <table 2>
select * from <table 1>;
0
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.