About table partitioning for Oracle

Table hash partitioning can improve performance of queries on large tables. To enable hash partitioning on a table, add the <ora-table-hash-partitioning> element to the <ora-table-ddl> block of <ora-db-ddl> in database-config.xml. For example:

<database name="PolicyCenterDatabase" dbtype="oracle">
  ...
  <upgrade>
    ...
    <ora-db-ddl>
      <ora-table-ddl name="Table Name">
        <ora-table-hash-partitioning hash-column="column name" num-partitions="number"/>
      </ora-table-ddl>
    </ora-db-ddl>
  </upgrade>
</database>

If a keyable table is partitioned, by default, PolicyCenter uses the ID column as the hash column. You can specify a different column by using the hash-column attribute on <ora-table-hash-partitioning>. For non-keyable tables, the hash-column attribute is required.

If a keyable table is partitioned, PolicyCenter also partitions the primary key index and the index on PublicID. This index is on PublicID and Retired if the table is for a retireable entity.

By default, PolicyCenter uses 128 partitions. You can override this number by defining a num-partitions attribute on <ora-table-hash-partitioning>.

Note: PolicyCenter creates partitions only if creating a table or index. PolicyCenter does not modify existing tables or indexes. If an upgrade process drops and rebuilds a table, PolicyCenter partitions the table if the table is configured to be partitioned. The schema verifier detects and flags the table if a table is configured as partitioned but is not, or if it is not configured as partitioned but is partitioned.

See also