Creation date Minimum version
2017-9-22 1.2.2

Horizontal Partition

The Horizontal Partition extension enables you to split your active table into multiple tables, keeping the schema of the table intact. After horizontal partitioning, you can choose to start operations on only the resultant table of interest, which consists of fewer records than the original table and hence the improved performance.

Understanding partitions

A partition is a table containing a subset of records that exist in the active table. The column from which you start the extension is the partition column.

A partition contains the rows with the same value in the partition column. You cannot specify the number of rows in a partition. Also, the partition value is determined by the exact value in a column. You cannot specify the condition for the rows in a partition. For example, you cannot specify that the values greater than 100 in the partition column be in one partition and the values less than 100 in the partition column be in another partition.

Example: Your active table has a column named Salary, and the values in this column are 100, 200, 300, and 400. Suppose you start the Horizontal Partition extension from this column, Xcalar creates 4 partitions: a partition containing all the rows with 100 as the Salary value, a partition containing all the rows with 200 as the Salary value, and so on.

Understanding the number of horizontal partitions

The number of partitions is the number of tables created by the extension. You can create 1 to 10 partitions.

Xcalar chooses the values with the highest number of occurrences when creating the partitions.

Example: Suppose four values exist in the partition column, which are 100, 200, 300, and 400, and you want to create two partitions. Xcalar will create partitions for the values with the two highest frequencies. If the values 200 and 300 occur most frequently in the column, one partition is created for the rows with 200 and another is created for the rows with 300. No partitions are created for rows with 100 or 400.
NOTE: If multiple values have the same frequencies in the partition column, the result might be nondeterministic. That is, partitions are created for some values of the same frequency when the limit of the number of partitions is reached.

If the specified number of partitions is greater than the number of different values in the partition column, Xcalar will create only the necessary number of partitions. For example, if only four values exist in the partition column and you specify 10 partitions, only four partitions will be created.

Invoking the Horizontal Partition extension

Follow these steps to invoke the Horizontal Partition extension:

  1. In the My Extensions panel, select Horizontal Partition.
  2. In the Table field, select the table containing the column you want to perform the partition on.
  3. In the No. of Partitions field, type a number. This is the number of new tables created by the extension.
  4. Click APPLY.
  1. in the table.

Go to top