1

I want to create a TTL index for a table.

  • Table size 1.2TB

I have a shard infra. Each shard is having 3 node replica set.

For creating this index, can I go with the rolling index creation method? Or any other suggestion?

1

The rolling index build procedure is recommended. Here is what they say in the doc:

To minimize the impact of building an index on replica sets and sharded clusters, use a rolling index build procedure as described on Build Indexes on Replica Sets.

for more info:

https://docs.mongodb.com/manual/tutorial/build-indexes-on-replica-sets/ https://docs.mongodb.com/manual/tutorial/build-indexes-on-sharded-clusters/ https://docs.mongodb.com/manual/core/index-ttl/ https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#db.collection.createIndex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.