0 votes
in NoSQL by

You need to change the shard key of an existing MongoDB collection. What do you do?

a. Dump the collection data, drop the collection, create a new collection and shard key, import the data.

b. Add second shard key and drop the first shard key.

c. Dump the collection data, drop the collection, presplit the data, create a new collection and shard key, import the data.

d. Drop and recreate the shard key.

1 Answer

0 votes
by

You need to change the shard key of an existing MongoDB collection. What do you do?

.

Answer:-  Dump the collection data, drop the collection, presplit the data, create a new collection and shard key, import the data.

Related questions

+1 vote
asked Aug 15, 2022 in NoSQL by AdilsonLima
+1 vote
asked Aug 15, 2022 in NoSQL by AdilsonLima
...