In TiDB is it possible to change the SHARD_ROW_ID_BITS later on after inserting some data?

36 Views Asked by At

Hi I have a question on SHARD_ROW_ID_BITS in TiDB. I understand you can specify such as 4 or 5 for this value depending on how much shards you want. Question, is it possible to increase this value in case you want further sharding later? Decreasing?

https://docs.pingcap.com/tidb/stable/shard-row-id-bits

1

There are 1 best solutions below

0
Wink Yao On BEST ANSWER

yes. You can use alter statement to do that, like:

ALTER TABLE t SHARD_ROW_ID_BITS = 4;

Increasing and decreasing are both supported