Create partition policies using the Database Administration Console
- Last Updated: February 22, 2022
- 7 minute read
- OpenEdge
- Version 13.0
- Documentation
Now that you have learned how to create new partitioned tables using the Data Dictionary tool, you are ready to learn how to create partition policies and partition policy details for each partitioned table.
A table partition policy defines how a table is partitioned. A table partition policy is a database meta-schema that consists of details such as policy name, the partition type, the columns involved and various attributes, such as the default areas for data, LOB, and index storage associated with the partition. You can define only one partition policy for each table being partitioned.
You can create a table partition policy and partition a table using the Create the Table Partition Policy wizard.
Before you begin, ensure that you have selected a database connection and the database server is running.
- Do one of the following to open the Create Table Partition
Policy wizard:
- From the management console, select . The Connection page appears. From the list of connections, select the connection in which you want to create the partition policy. Then, in the Storage Management section, click Create partition policy. The Create Table Partition Policy wizard appears.
- From the management console, select . The Connection page
appears. From the list of connections, select the connection in which
you want to create the partition policy. Then, in the Storage Management section, click
Partition policies. The
Table Partition Policies page
appears.
Click New from the page menu options. The Create Table Partition Policy wizard appears.
- From the management console, select . The Create Table Partition Policy wizard appears.
- Provide the following information:
- Policy name — Specify a unique name for the partition policy. The name can contain only alphanumeric characters. It must not contain blank spaces or special characters, except underscore (“_”) and hyphen (“-”).
- Description — Describe the partition policy. Description is an optional field.
- Database connection name — Enter
a database connection name to which you want to add the new policy.
You can either enter the database connection name or click Search to select a database connection from the list of connections in the Connection Selection dialog box. To refine your search you can Apply Filter to the connection name based on its AdminServer and/or Category details.
By default, the last used database connection name appears in the Database connection field.Note: When you type the name of the database connection, follow the format that OpenEdge Management uses to define a connection: adminserver-name.database-name. A database server must be running to connect to the database. You cannot update the database connection name after you create a table partition policy. - Table — Specify the table for
which the partition policy must be created. Enter a name or click the
Search icon to select a table
to be partitioned from the Table
Selection dialog box.Note: You cannot update the table selection details after you create a table partition policy.
- Default data area — Specify the
default storage location for the table data. Enter an area name or click
the Search icon to select an area
from the Area Selection dialog
box.
In the Area Selection dialog box, you can Apply Filter to the area name based on its Records per block and/or Cluster size details.
- Default index area — Specify the default storage location for the indexes. Enter an area name or click the Search icon to select an area from the Area Selection dialog box. To refine your search you can also Apply Filter to the area name based on its Records per block and/or Cluster size details.
- Default LOB area — Specify the default storage area for the partition's LOB fields. Enter an area name or click the Search icon to select an area from the Area Selection dialog box. To refine your search you can also Apply Filter to the area name based on its Records per block and/or Cluster size details.
- Object allocation rule — Specify Set new partitions not to allocate space to not allocate any space for the new partitions or Set new partitions to allocate space to allocate storage space for the new partitions.
- Read-only composite — Set this option to set a composite table partition policy as read-only.
- Click Next to specify partition fields
and partition aligned indexes for the table partition policy.Note: The Next button is disabled until all the mandatory fields are specified.
- Define the partition fields in the Partition
fields area using the following: Note: You cannot update the field selection details after you create a table partition policy.
- Select the Has Range check box
if you want to partition the table based on a value range associated
with a particular column.
The column supports the following data types: numeric, character, date, datetime, and datetimetz. For example, a partition can be based on a range of values for a data type, such as a historical (date) range or a salary (numeric) range.
- Click Add fields from table to add fields from the table associated with the partitioning. Select fields from the list of fields from the Field Selection dialog box.
- Click Add fields from index to add fields from the index. Select an index from the list of indexes from the Index Selection dialog box.
- Select an existing field and click Remove Field to remove the field from the Table Partition Policy.
- Click the Move field up icon to move a field above an existing field in the list of fields.
- Click the Move field down icon to move a field down.
- Select the Has Range check box
if you want to partition the table based on a value range associated
with a particular column.
- In the Partition aligned indexes area,
select one or more indexes from the list of indexes as Local index.Note: The indexes in this area are populated based on the partition fields added in the Partition fields area. The indexes that are common to the fields in the Partition field area are displayed in the Partition aligned indexes area. You must have at least one aligned index to create table partition policy. If no indexes are displayed in the Partition aligned indexes area, you must add or remove fields added in the Partition fields area or create an index that is aligned with the fields you want to add in the Partition fields area.
- Click Next to load partition policy
detailsNote: The Next button is disabled until all the mandatory fields are specified.
- Click Properties to set a template for
automatically assigning unique names to discovered partition policy details. The
Template Properties dialog appears.
The default template is in the
&{PartitionPolicyName}-&{Number}format.Note: This feature is useful if there is a large number of discovered partition policy details. - Select the Name template location and
template property to change the default template.Note: Properties, such as Values[1] and Values[2], are partition fields with which the indexes are aligned.
- Click Copy to add the selected template property at the specified Name template location. You can also enter a string manually in the Name template.
- Click OK to apply the name template
changes or click Cancel to exit without
changing the default name template.
For example, consider that you create a partition policy,
Salary_Partition, on thesalarycolumn that stores all the salary details in theEmployeetable. You can have a partition based on whether the salary is equal to 5000 and another partition based on whether the salary is equal to 6000. TheValues[1]property is theEmpIDcolumn. To set a name template as&{PartitionPolicyName}-&{Number}-&{Values[1]}EMP_ID:- Select the right-most location in Name template and click the Values[1] property.
- Click Copy to
add
-&{Values[1]}to the Name template. - Select the right-most location in Name template and enter EMP_ID.
The partition policy detail names can be
Salary_Partition-1-103988EMP_IDandSalary_Partition-2-102415EMP_ID. - Click Load Details for OpenEdge
Management or to discover and load partition policy details to the table
partition policy. The names of the discovered policy details are defined based
on the partition policy detail name template. After the details load, you can
edit them, or commit the existing details.Note: If the table does not have any data, you must manually add the partition policy details in the next page of the wizard. Note that even though the partitions are discovered and created, the table data does not migrate to the respective partitions until you perform the splittarget operation. Also, the splittarget operation can be performed only on the table partition policy that has the Has range option selected. For information on splittarget, see the Managing table partition policy details section.
- Click Next to manually load partition policy details or click Finish to accept the default partition policy details loaded in the previous step, or Click Generate policy program to generate OpenEdge ABL code (.p) that you can use in OpenEdge ABL programs to create a table partition policy. Note that generating the policy program only generates the policy program; you must click Finish to commit and add the partition policy to the database.
- View any of the default partition policy details and perform any of the
following:
- Click Add and then specify the
partition policy detail values, name, allocation, and area details to
manually add a partition policy detail. Click Update to add the partition policy
detail or click Cancel to delete
the partition policy detail. This adds the policy detail after all the
existing policy details.Note: You can also select an existing partition policy detail and click Insert Before or Insert After to manually add a partition policy detail at a required position in the list of partition policy details.
- Double-click any of the existing table partition policy details to edit the Name/Description, Allocation, and Areas values, and then click Update to incorporate the recently made edits or click Cancel to ignore the recently made edits. For more information on setting table partition policy details, see Creating table partition policy details.Note: Allocation and Areas values are editable only if the partition policy details are not already in the allocated state.
- Click Reset to ignore all the recently made edits to the partition policy details.
- Select a partition policy detail and click Delete to delete that partition policy detail.
- Click Add and then specify the
partition policy detail values, name, allocation, and area details to
manually add a partition policy detail. Click Update to add the partition policy
detail or click Cancel to delete
the partition policy detail. This adds the policy detail after all the
existing policy details.
- Click:
- Finish to commit and add the table partition policy in the database.
- Previous to navigate to a previous page of the wizard and edit any details of the table partition policy.
- Cancel to not add this table partition policy in the database.
- Generate policy program to generate an OpenEdge ABL code (.p) that you can use in OpenEdge ABL programs to create a table partition policy. Note that generating the policy program only generates the policy program; you must click Finish to add the partition policy to the database.