alter integer primary key to auto_random with certain auto_random_base #19724
Labels
feature/reviewing
This feature request is reviewing by product managers
sig/sql-infra
SIG: SQL Infra
type/feature-request
Categorizes issue or PR as related to a new feature.
Feature Request
Is your feature request related to a problem? Please describe:
Let's say we have the following table whose primary key is an integer:
or column
a
is defined withoutauto_increment
:After inserting some data to table
t
, users may detect that there is a hot write region in the tablet
. Currently, users have to rebuild the table like the following:auto_random
Describe the feature you'd like:
Since TiDB has
auto_random
property for an int primary key, it would be great to support altering the int primary column toauto_random
without rebuilding the whole table. Since there is existing data in the table, it's better to set theauto_random_base
to be larger than a certain value.This issue requests to support a certain
alter table
statement like the following:Describe alternatives you've considered:
N/A
Teachability, Documentation, Adoption, Migration Strategy:
N/A
The text was updated successfully, but these errors were encountered: