Partitioning Table [message #166837] |
Sun, 09 April 2006 23:17 |
faiz_hyd
Messages: 294 Registered: February 2006
|
Senior Member |
|
|
Hi
We have a plan to implement partitioning feature on huge fast growing tables,one of Suggestion is
To add a new column of date type in all the tables to be partitioned, then update the column value periodically based on some id's and other joins from other tables.
create new tablespaces to for each partition table or single partition and then partition the table ,Problem here is updating
for 10 tables each holding around 30-40 million rows(5 tables) and remaing 5 holding 10-15 million rows how long update will go and what should be the approch we are not able to finalize.
Second Idea is
create new_table table as select * from old_table
partition new_table.
drop old_table;
rename new_table to Old_Table;
create constaint,indexes on new_table;
Now here if i want to create constraint and Index on new_Table i can't create with same name since all those names already exists for OLD_TABLE, so if dropped OLD_TABLE then constraints and indexes get dropped, and moreover if this OLD_TABLE is referencing or this is Master table then dropping problem,
or even if we dropped then how to recreate the constraints,referential integrity, indexes of same name as it was for old table..
IF you people have any better approach for partitioning please share your experience,
and how much time do you people think it should take for a table with 40 millions to be partitioned (approx) just to get an idea..
because we can't afford more than 6 hrs of downtime on Production Database, and like this 8-10 tables are there, so better to do 1 table at a time or what..
Thanks
|
|
|
Re: Partitioning Table [message #166889 is a reply to message #166837] |
Mon, 10 April 2006 03:01 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
You can rename constraints and indexes on the old table before you start with ALTER TABLE RENAME CONSTRAINT and ALTER INDEX RENAME TO.
However, if you use DBMS_REDEFINITION to rebuild the table as a partitioned table, it will handle the index and constraint naming for you.
Ross Leishman
|
|
|
|