Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 动态修改主键、容量评估
[TiDB Usage Environment]
TiKV, 32C 64G
[TiDB Version]
5.7.25-TiDB-v4.0.10
-
Currently, the table id primary key is incremental. Can it be modified to auto_random and simultaneously increase SHARD_ROW_ID_BITS? If it cannot be modified, and the only way is to create a new table and migrate data from the old table to the new table, it should not be possible to directly insert the old table id into the new table.
-
The maximum concurrency for a single table is 1000, with 400 million records per year and 3 associated tables. Besides adjusting auto_random and SHARD_ROW_ID_BITS=6, the business mainly queries data from the past year. Is it necessary to archive data and add partitions monthly? Will SHARD_ROW_ID_BITS=6 affect query performance?