使用限制
OceanBase(admin@test)>create table test(pk int,c2 int ,c3 int, primary key(pk)) partition by hash(pk) partitions 5;
Query OK, 0 rows affected (0.20 sec)
ERROR-00600: internal error code, arguments: -5261, A UNIQUE INDEX must include all columns in the table's partitioning function
OceanBase(admin@test)> create unique index idx on test(c2, pk) LOCAL;
Query OK, 0 rows affected (0.02 sec)
Query OK, 0 rows affected (17.47 sec)