Moving an Oracle table to an index

I have an Oracle table in a live production environment, and the table is more than half a gigabyte. Is it possible to change this regular Oracle table from a heap organized for indexing, or can this be achieved only by moving data from this table to another new table that is organized by the index? In any case, I would appreciate it if you could list the steps associated with this procedure.

+4
source share
2 answers

There is no way to modify a table to make it an index-organized table. Instead, you can override the table (using DBMS_REDEFINITION ) or create a 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;
+2

DBMS_REDEFINITION, CTAS , .

  • , , ..
  • , . , , .
  • select ( , )
  • , 2
  • ( , ( , , ).
  • 2 ( )
  • ( 3) select * from new minus select * from old; , , .

, .

+1

Source: https://habr.com/ru/post/1657785/


All Articles