PARTITION TABLE

Documentation

VoltDB Home » Documentation » Using VoltDB

PARTITION TABLE

PARTITION TABLE — Specifies that a table is partitioned and which is the partitioning column.

Synopsis

PARTITION TABLE table-name ON COLUMN column-name

Description

Partitioning a table specifies that different records are stored in different unique partitions, based on the value of the specified column. The table table-name and column column-name must be valid, declared elements in the current DDL file or VoltDB generates an error when compiling the schema.

For a table to be partitioned, the partitioning column must be declared as NOT NULL. If you do not declare a partitioning column of a table in the DDL, the table is assumed to be a replicated table.

Example

The following example partitions the table Employee on the column EmployeeID.

PARTITION TABLE Employee on COLUMN EmployeeID;