Creating a new table, to replace an old one
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