-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: add primary key on empty table very slow #47607
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-communityOriginated from the communityOriginated from the communityX-blathers-triagedblathers was able to find an ownerblathers was able to find an owner
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-communityOriginated from the communityOriginated from the communityX-blathers-triagedblathers was able to find an ownerblathers was able to find an owner
Describe the problem
discover while trying reproduce #47512
To Reproduce
cockroach start-single-node --insecure(empty data)create_users_table.sqlwith content followcockroach sql --insecure < create_users_table.sqlIt take a whooping 30s to add primary key on empty table (╯°□°)╯︵ ┻━┻
Expected behavior
Should be much faster since the table is empty.
Environment:
cockroach sql(same version as server)