Creating a Hash-Range Partition

Hash-range partitioning is a composite partitioning scheme that subpartitions a hash-partitioned table by range. Hash-range partitioning provides the benefits of hash and range partitioning.

Prerequisites
Database Version Table Partition Privileges
SAP Sybase IQ 15.3 and 15.4 Requires one of:
  • DBA authority.
  • SPACE ADMIN authority, and one of:
    • ALTER permission on the table.
    • You own the table.
SAP Sybase IQ 16.0
Requires one of:
  • ALTER ANY OBJECT system privilege.
  • CREATE permission on the dbspace along with one of:
    • ALTER ANY TABLE system privilege.
    • ALTER permission on the table.
    • You own the table.
Task
  1. In the Perspective Resources view, select the resource and select Resource > Administration Console.
  2. In the Administration Console, expand IQ Servers > Schema Objects > Tables.
  3. Select Tables, select the table in the right pane, click the drop-down arrow that appears next to the table name, and select Properties.
  4. Select Partitions and click New.
    The Create Partition Wizard appears.
  5. On the Partition Type page, specify a hash-range partition:
    Option Description
    What type of partition do you want to create? Select Hash-Range.
  6. Click Next.
  7. On the Partition Key page, specify one or more table columns.
    Option Description
    Which column do you want to include in the partition key?

    Select one or more table columns and click Add.

    A partition key cannot contain LOB, binary, varbinary, bit, float, double, or real data, or any char or varchar column with a length that exceeds 255 bytes.

  8. Click Next.
  9. On the Subpartition Key page, specify a column.
    Option Description
    Which column do you want to include in the subpartition key?

    Select a table column and click Add.

    A partition key cannot contain LOB, binary, varbinary, bit, float, double, or real data, or any char or varchar column over 255 bytes long.

  10. Click Next.
  11. On the Subpartitions page, specify the range partition definition:
    Option Description
    Specify the name, value and dbspace for the range subpartition.
    • Name – Enter a descriptive name for the partition.
    • Constraint – Less than or equal (<=) is only constraint supported.
    • Value – Enter the upper limit value of the partition. You cannot specify NULL.
    • Dbspace – Select the dbspace for the partition from the pull-down.
  12. On the Columns page, click Add if you want to store any column data in a separate dbspace from the partition. Otherwise, click Finish.
    If you click Add, the Specify Dbspace for a Partition Column page appears.
  13. Choose the column, partition, and dbspace from the pull-down and click OK.
  14. When you have specified all the columns desired, click Finish.
Related tasks
Creating a Hash Partition
Creating a Range Partition
Deleting a Partition
Unpartitioning a Table
Merging Partitions
Splitting Partitions
Moving a Partition
Managing Column Storage in a Table Partition
Viewing or Modifying Table Partition Properties
Authenticating a Login Account for a Managed Resource
Related reference
Table Partition Privilege Summary