循环分布方案

以下示例将未分片表 pen_typespen_makers 合并为单独一个分片表 pen_types。表 pen_types 驻留在 dbspace dbsp1 中,表 pen_makers 驻留在 dbspace dbsp2 中。每个表中的表结构是相同的。
ALTER FRAGMENT ON TABLE pen_types ATTACH pen_types, pen_makers;

执行 ATTACH 子句之后,数据库服务器使用循环分布方案将表 pen_types 分片为两个 dbspaces:包含 pen_types 的 dbspace 和包含 pen_makers 的 dbspace 。表 pen_makers 已死,并且不再存在;原来在表 pen_makers 中的所有行现在都在表 pen_types 中。