Skip to content

Commit 38f08bd

Browse files
committed
follow comments
1 parent b2f80fc commit 38f08bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

partitioned-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,7 @@ 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. 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.
17871787

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

0 commit comments

Comments
 (0)