...
3. If it is upgraded to Altibase version 6.3.1 or higher, PK or UNIQUE INDEX can be created as a global index.
# Example
| Code Block |
|---|
iSQL> CREATE TABLE REALSET_CONTENTS
2 (
3 CT_ID VARCHAR (32) NOT NULL,
4 CT_TYPE VARCHAR (2) NOT NULL,
5 CT_PATH VARCHAR (256) NOT NULL,
6 CT_URL VARCHAR (256) NOT NULL,
7 REG_DATE DATE NOT NULL,
8 FILE_NAME VARCHAR (256) NOT NULL,
9 STATUS VARCHAR (4) NOT NULL
10 )
11 PARTITION BY RANGE (REG_DATE)
12 (
13 PARTITION P_1 VALUES LESS THAN (to_date('2013-05-01', 'YYYY-MM-DD')),
14 PARTITION P_2 VALUES LESS THAN (to_date('2013-09-01', 'YYYY-MM-DD')),
15 PARTITION P_DEF VALUES DEFAULT
16 )
17 TABLESPACE SYS_TBS_DISK_DATA;
Create success.
iSQL> alter table REALSET_CONTENTS add primary key(CT_ID,REG_DATE);
[ERR-31283 : Unable to create a primary key or a unique key constraint in the local non-prefixed index.] |
...
Reference
...
# Index type for the partitioned table
Class condition 1 | Class condition 2 | Class condition 3 | Index type | Support/Not Supported |
|---|---|---|---|---|
The index is partitioned. | index part key = table part key | index part key = index key | (Partitioned) Local prefixed Index | Supported |
|
| index part key != index key | (Partitioned) Local nonprefixed Index | Supported |
| index part key != table part key | index part key = index key | (Partitioned) Global prefixed Index | Not supported |
|
| index part key != index key | (Partitioned) Global nonprefixed Index | No Not supported |
The index is not partitioned. |
|
| Nonpartitioned global index | Supported in version 6.3.1 or later |
...