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"?

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Greg Anderson,
    The command for unsharding a particular table is - 

    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 -

    Let me know what your requirements are and I can assist in a better manner. 

Like Follow
  • Status Answered
  • 2 yrs agoLast active
  • 1Replies
  • 380Views
  • 2 Following