Removing column from sharding key
Trying to drop a column from a table and it turns out the column is part of a sharding key so it won't let me drop it. Error received:
Can not drop column that is part of sharding key. Remove column(s) being dropped from sharding key before dropping the column(s). Column:BSEG_ID
Statement=ALTER TABLE "Billing History Data" DROP COLUMN BSEG_ID;
Question I have is how to do what the error is suggesting which is "Remove column being dropped from sharding key before dropping the column"?
Hi Greg Anderson,
The command for unsharding a particular table is -
ALTER TABLE <tablename> SET DIMENSION;
However, it will cause the table to be unsharded and replicated on all the nodes. This can degrade the overall performance of the system if the table is large. Also, if the table is co-sharded with any table, deleting the shard key will cause the search to happen in an exhaustive manner for all the data on each node, hence slowing down the system.
Some considerations around sharding are - https://community.thoughtspot.com/t/36zx5b/choosing-a-shard-key
Let me know what your requirements are and I can assist in a better manner.