Question: You need to change the shard key of an existing MongoDB collection. What do you do?
- Dump the collection data, drop the collection, create a new collection and shard key, import the data.
- Add second shard key and drop the first shard key.
- Dump the collection data, drop the collection, presplit the data, create a new collection and shard key, import the data.
- Drop and recreate the shard key.
Answer: The correct answer of the above question is Option C:Dump the collection data, drop the collection, presplit the data, create a new collection and shard key, import the data.