Browse Category: Partition

Cómo particionar una tabla existente usando DBMS_Redefinition

Presentaré un ejemplo de cómo particionar una tabla ya existente usando el paquete dbms_redefinition. Dicho paquete nos permite realizar una reorganización de tablas online.

Existen ciertas restricciones por las cuales las tablas de la siguientes características no podrán ser redefinidas online (metalink ID 149564.1):

  • [9.0.1]Tables with no primary keys
  • Tables that have materialized view logs defined on them
  • [9i] Tables that are materialized view container tables and AQ tables
  • [10g] Tables that are replicated in an n-way master configuration can be redefined, but horizontal subsetting (subset of rows in the table), vertical subsetting (subset of columns in the table), and column transformations are not allowed
  • Tables with fine-grained access control (row-level security)
  • Tables with BFILE columns
  • Tables with LONG columns can be redefined online, but those columns must be converted to CLOBS. Also, LONG RAW columns must be converted to BLOBS. Tables with LOB columns are acceptable.
  • Tables in the SYS and SYSTEM schema
  • Temporary tables
Los pasos para particionar una tabla ya existente son los siguientes: