Search
- If the version of your PolarDB-X 1.0 instance is V5.4.7-16000638 or later, you can change shard key values in the following
scenarios:
- An UPDATE statement can be executed to update the shard key field in a logical table.
- The value of a shard key or a unique key in a VALUES clause can be left blank or the
specified value is DEFAULT.
- INSERT ON DUPLICATE KEY UPDATE can be executed to change the value of a primary key,
unique key, or shard key.
- If the version of your PolarDB-X 1.0 instance is earlier than V5.4.7-16000638, the shard keys that have been created for
sharding cannot be changed. If you need to change the shard key for a table, you can
use the following temporary method:
- Select a new database shard key and create a table.
- Import the data of the original table to the created table.
Thank you! We've received your feedback.