Skip to content

Commit 2b39ecb

Browse files
committed
follow comments
1 parent b2f80fc commit 2b39ecb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

partitioned-table.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,9 @@ SELECT * FROM INFORMATION_SCHEMA.TIDB_INDEXES WHERE table_name='t1';
17831783
3 rows in set (0.00 sec)
17841784
```
17851785

1786-
When partitioning a non-partitioned table or repartitioning an already partitioned table, you can update the indexes to be global indexes or revert them to local indexes as needed:
1786+
When partitioning a non-partitioned table or repartitioning an already partitioned table, you can update the indexes to be global indexes or revert them to local indexes as needed.
1787+
1788+
The following SQL will flipping all the indexes from GLOBAL to LOCAL and LOCAL to GLOBAL. And `uidx3` needs to be global, since it does not include the new partitioning column `col1`, while `uidx12` and `idx1` can be either GLOBAL or LOCAL.
17871789

17881790
```sql
17891791
ALTER TABLE t1 PARTITION BY HASH (col1) PARTITIONS 3 UPDATE INDEXES (uidx12 LOCAL, uidx3 GLOBAL, idx1 LOCAL);

0 commit comments

Comments
 (0)