Overview
Partitioning refers to splitting what is logically one large table into smaller physical pieces based on specific schemes. The table based on the logic is called a partitioned table, and a physical piece is called a partition. Data is stored on these smaller physical pieces, namely, partitions, instead of the larger logical partitioned table.
Follow the steps below to define a table in your database:
- In the Object Browser pane, right-click Regular Tables, and select Create Partition Table.
- Provide basic table information such as table name, tablespace, table type and so on. For more details, refer to Providing General Information.
- Define column related information such as column name, data type schema, data type, and column constraints. For more details, refer to Defining Columns.
- Select the data distribution information for the table. For more details, refer to Selecting Data Distribution.
- Define the column constraints for different constraint types such as primary key, unique, and check. For more details, refer to Defining Table Constraints.
- Define the index information for the table such as index name, access method, tablespace and so on. For more details, refer to Defining Indexes.
- Define the partition information for the table such as partition name, partition column, partition value and so on. For more details, refer to Defining a Partition.
In SQL Preview tab, you can view the SQL query automatically generated for the inputs provided. For more details, refer to SQL Preview.
- To include comments for Column in Create Partition Table, add column information in Description of Column (Max 5000 chars) text box and click Add button.
Providing General Information
Provide the following information to create a table:
For information on completing the below fields refer to Providing General Information.
- Table Name
- Schema
- Tablespace
- Options
- Description of Table
For completing all other fields refer below:
- Select table orientation from the Table Orientation drop-down list.
If table orientation is selected as ORC, then an HDFS Partitioned table is created.
- Enter the ORC version number in the ORC Version field. This is applicable only for HDFS Partitioned table.
- After providing the general information about the table, click Next to define the columns information for the table.
The following table lists the supported fields for each Partition type tables:
Table 1 Supported fields Field Name
Row Partition
Column Partition
ORC Partition
Tablespace
Normal
Normal
HDFS
Table Type



If Not Exists



With OIDS



Fill Factor



The following table lists the supported fields for each Partition type tables:
| Field Name | Row Partition | Column Partition | ORC Partition |
|---|---|---|---|
| Array Dimensions |
|
|
|
| Data type Schema |
|
|
|
| Not Null |
|
|
|
| Default |
|
|
|
| Unique |
|
|
|
| Check |
|
|
|
Change Order of Partition
You can change the order of partition as required in the table. To change the order, select the required partition and click Up or Down.
Editing a Partition
Follow the steps below to edit a partition:
- Select the required partition.
- Click Edit.
- Edit the partition details as required and click Update to save changes.
You must complete the edit operation and save the changes to continue with other operations
Deleting a Partition
Follow the steps below to delete a partition:
- Select the required partition.
- Click Delete.
Defining a Partition
The following table lists the supported fields/options for each partition type tables:
| Field/Option Name | Row Partition | Column Partition | ORC Partition |
|---|---|---|---|
| Partition Type | By Range | By Range | By Values |
| Partition Name |
|
|
|
| Partition Value |
|
|
|
| Tablespace | Normal | Normal |
|
Follow the steps below to define partition(s) for the table:
- If Row or Column is selected as Table Orientation in the General tab, then By Range is displayed in the Partition Type section. If ORC is selected as Table Orientation in the General tab, then By Value is displayed in the Partition Type section.
- Select the column based on which partition needs be defined from the Available Column section and click
. The column moves to the Partition Column section.
- If Table Orientation is selected as Row or Column, then only one column can be selected for partition.
- If Table Orientation is selected as ORC, then maximum of four columns can be selected for partition.
- A maximum of 4 columns can be selected to define partition.
- Enter a name for the partition in Partition Name field.
- Click
next to the Partition Value field. - Enter the value by which you want to partition the table in Value column.
- Click OK.
- Select the tablespace name from the Tablespace drop-down list.
Partition Name, Partition Value, Tablespace and Partitions section are disabled for ORC Partitioned tables.
- After you enter all information for partition, click Add.
- After defining all partitions, click Next.
You can perform the following operations on an existing partition for the row or column partitioned table. Below operations are not applicable for ORC Partitioned table:
Defining Indexes
Refer to Defining Indexes to define table indexes.
| Field/Option Name | Row Partition | Column Partition | ORC Partition |
|---|---|---|---|
| Unique Index |
|
|
|
| btree |
|
|
|
| gin |
|
|
|
| gist |
|
|
|
| hash |
|
|
|
| psort |
|
|
|
| spgist |
|
|
|
| Tablespace | Normal | Normal |
|
| Fill Factor |
|
|
|
| User Defined Expression |
|
|
|
| Partial Index |
|
|
|
| Option Name | Row Partition | Column Partition | ORC Partition |
|---|---|---|---|
| Check |
|
|
|
| Unique |
|
|
|
| Primary Key |
|
|
|
Selecting Data Distribution
Refer to Selecting Data Distribution for selecting the distribution type.
| Option Name | Row Partition | Column Partition | ORC Partition |
|---|---|---|---|
| Default |
|
|
|
| Hash |
|
|
|
| Replication |
|
|
|
Last Article: Creating Partition Table
Next Article: Working with Partitions







































































Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.