Reputation: 61
I have an Oracle table in a live production environment and the table is over half a gig in size. Is it possible to change this normal Oracle table from being heap organised to index organised or is this only achievable by moving the data from this table to another new table which is index organised? Either way, I would be grateful if you could you please list the steps involved in this procedure.
Upvotes: 4
Views: 585
Reputation: 3351
There is no way to alter a table to make it index-organized table. Instead you can redefine the table(using DBMS_REDEFINITION)or can create new table using CTAS.
Example:
create table t2 (
id number, first_name varchar2(20),
constraint pk_id primary key (id)
)
organization index
as select * from t1;
Upvotes: 2
Reputation: 4818
I never used DBMS_REDEFINITION
but with CTAS it is not only step to create table if it is production.
select * from new minus select * from old;
or if you have timstamp of inserting row just insert new rows.I hope the list is complete.
Upvotes: 1