DEFAULTSTORAGEGROUPS System Table Description
Description
This table contains table partition to storage group mappings created with the MAP PARTITION
statement.
See MAP PARTITION
for more information.
MAP PARTITION is deprecated in NuoDB 5.1.
|
Fields
Field | Type | Description |
---|---|---|
PARTITIONNAME |
string |
The name of the table partition mapped to the storage group specified in the |
STORAGEGROUP |
string |
The name of the storage group to which the table partition in the |
Example
In the example below, we map partition p_east
to storage group sgeast
and partition p_west
to storage group sgwest
. This means, by default, if you do not specify STORE IN
, then data inserted into partition p_east
will be stored in storage group sgeast
and data inserted into partition p_west
will be stored in sgwest
.
MAP PARTITION p_east STORE IN sgeast;
MAP PARTITION p_west STORE IN sgwest;
SELECT * FROM system.defaultstoragegroups;
PARTITIONNAME STORAGEGROUP
-------------- -------------
P_EAST SGEAST
P_WEST SGWEST
CREATE TABLE users (first STRING, last STRING, zip CHAR(5))
PARTITION BY RANGE (zip)
PARTITION p_east VALUES LESS THAN ('70000')
PARTITION p_west VALUES LESS THAN (maxvalue);