Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating a new table, to replace an old one

user12048358Jun 26 2012 — edited Jun 27 2012
Hi experts;

I'm looking for an advice about what I'm going to do.
This is the situation;
I got a production table with more than 1,000,000,000 of records.
the queries to this table are too slow, and I decided to create a new table, to replace this one.
But my doubts are:
How can I create a new table including the same structure as the old one, and with some data.
I got this query:

Create new_table as select * from old_table
where trans_year = '2012';
I know with this I got the structure, but what about indexes?
My other doubt is, to replace the old one, just I drop it, and rename the new one?

This table belong to an oracle 9i DB.

Thanks for your comments.

Al
This post has been answered by Andy Klock on Jun 27 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2012
Added on Jun 26 2012
15 comments
485 views