# `VERSION::8.5.0` Global Index Limitations
+ Global indexes affect partition management: 
  + DROP, TRUNCATE, and REORGANIZE PARTITION will only return results after the global indexes are fully updated.
+ A clustered index cannot be a global index. 
  + If the clustered index is a global index, the table will no longer be partitioned.
  + If you need to set the primary key as a global index, you must explicitly define it as a non-clustered index
+ Currently, TiDB only supports creating unique global indexes on unique columns.
+ Tables with global indexes do not support the EXCHANGE PARTITION operation.

```
tidb> CREATE TABLE t2 (
    ->     col1 INT NOT NULL,
    ->     col2 DATE NOT NULL,
    ->     PRIMARY KEY (col2) CLUSTERED GLOBAL
    -> ) PARTITION BY HASH(col1) PARTITIONS 5;
ERROR 8200 (HY000): Unsupported create an index that is both a global index and a clustered index
```

------------------------------------------------------------------------------
Global indexes affect partition management. DROP, TRUNCATE, and REORGANIZE PARTITION operations also trigger updates to table-level global indexes, meaning that these DDL operations will only return results after the global indexes of the corresponding tables are fully updated. This is particularly evident in data archiving scenarios, such as `DROP PARTITION` and `TRUNCATE PARTITION`. Without global indexes, these operations can typically complete immediately. However, with global indexes, the execution time increases as the number of indexes that need to be updated grows.

A clustered index cannot be a global index. The reason is that if the clustered index is a global index, the table will no longer be partitioned. This is because the key of the clustered index is also the record key at the partition level, but the global index is at the table level, which causes a conflict. If you need to set the primary key as a global index, you must explicitly define it as a non-clustered index , for example, `PRIMARY KEY(col1, col2) NONCLUSTERED GLOBAL`.

Currently, TiDB only supports creating unique global indexes on unique columns. If you need to create a global index on a non-unique column, you can include a primary key in the global index to create a composite index. For example, if the non-unique column is `col3` and the primary key is col1, you can use the following statement to create a global index on the non-unique column `col3`: `ALTER TABLE ... ADD UNIQUE INDEX(col3, col1) GLOBAL;`

More detailed limitations can be found at https://docs.pingcap.com/tidb/stable/partitioned-table#limitations-of-global-indexes.

