# Couldn't decrease number of shards for table

**URL:** <https://community.cratedb.com/t/couldnt-decrease-number-of-shards-for-table/2014>\
**Category:** CrateDB\
**Tags:** sql, data-storage\
**Created:** [March 26, 2025, 7:42am UTC](https://community.cratedb.com/t/couldnt-decrease-number-of-shards-for-table/2014 "2025-03-26T07:42:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hammerhead](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/hammerhead/32/270_2.png) [@hammerhead](https://community.cratedb.com/u/hammerhead)\
**Post date:** [March 26, 2025, 7:45am UTC](https://community.cratedb.com/t/couldnt-decrease-number-of-shards-for-table/2014/2 "2025-03-26T07:45:43Z")

</div>

Hi @Jun_Zhou,

You will need to relocate all shards for that table to a single node using `ALTER TABLE spl.state_machine_def SET ("routing.allocation.require._name" = '<selected_node_name>');`

There is a complete example here: [Guide to decrease the number of shards in your cluster](https://community.cratedb.com/t/guide-to-decrease-the-number-of-shards-in-your-cluster/873)

---

_[View the full topic](https://community.cratedb.com/t/couldnt-decrease-number-of-shards-for-table/2014)._
