All Products
Search
Document Center

ApsaraDB for OceanBase:Overview

Last Updated:Jun 03, 2024

This topic describes the conversion scope of CREATE INDEX DDL operations during data migration from an Oracle database to an Oracle tenant of OceanBase Database.

Syntax

CREATE [ UNIQUE | BITMAP ] INDEX [ schema_name. ] index_name
  ON { cluster_index_clause
     | table_index_clause
     | bitmap_join_index_clause
     }
[ USABLE | UNUSABLE ]
[ { DEFERRED | IMMEDIATE } INVALIDATION ] ;


table_index_clause:
[ schema. ] table [ t_alias ]
(index_expr [ ASC | DESC ]
  [, index_expr [ ASC | DESC ] ]...)
  [ index_properties ]

index_properties:
[ { { global_partitioned_index
    | local_partitioned_index
    }
  | index_attributes
  }...
| INDEXTYPE IS { domain_index_clause
               | XMLIndex_clause
               }
]

cluster_index_clause:
CLUSTER [ schema. ] cluster 

index_attributes:
[ { physical_attributes_clause
  | logging_clause
  | ONLINE
  | TABLESPACE { tablespace | DEFAULT }
  | index_compression
  | { SORT | NOSORT }
  | REVERSE
  | VISIBLE | INVISIBLE
  | partial_index_clause
  | parallel_clause
  }...
]

bitmap_join_index_clause:
[ schema.]table
   ( [ [ schema. ]table. | t_alias. ]column
     [ ASC | DESC  ]
       [, [ [ schema. ]table. | t_alias. ]column
          [ ASC | DESC ]
       ]...
   )
   FROM [ schema. ]table [ t_alias ]
          [, [ schema. ]table [ t_alias ]
        ]...
   WHERE condition
      [ local_partitioned_index ] index_attributes

Supported operations

  • Creating unique indexes by using the UNIQUE INDEX option is supported.

  • Creating normal indexes by using the INDEX option is supported.

  • Defining normal indexes and unique key indexes by using the table_index_clause clause is supported. For more information, see Normal indexes.

Unsupported operations

  • Defining CLUSTER INDEX by using the cluster_index_clause clause is not supported. An error will be returned when you perform this operation.

  • Defining BITMAP INDEX by using the bitmap_join_index_clause clause is not supported. An error will be returned when you perform this operation.

Ignored clauses and options

Note

The following clauses and options will be ignored and will not be resolved or converted when they are specified in the synchronized DDL statements.

  • The USABLE and UNUSABLE option for defining whether the index is available.

  • The BITMAP INDEX option for defining the bitmap index. The keyword BITMAP will be ignored and a normal index will be created.

  • The DEFERRED INVALIDATION and IMMEDIATE INVALIDATION options that control the invalidation of dependent cursors in DDL operations for index creation.