lundi 22 décembre 2014

Oracle SQL Statement alter index and add partition


I have an index in which I have to remove one column and reindex back for rebuild:



ALTER INDEX <index_name> REBUILD;


Is it possible to add partition when I rebuild an index. Partition will be based on one of the column index which is a datetime field. Something like:



ALTER INDEX <index_name> REBUILD, PARTITION BY RANGE(COLLECTIONTIME) INTERVAL (INTERVAL '15' MINUTE)
(PARTITION INITIAL_PARTITION VALUES LESS THAN (DATE '2014-10-10') );


Not sure how to write the sql statement for it. Anyone can help?


Also, if it is possible will the existing records will also be partitioned?





Aucun commentaire:

Enregistrer un commentaire