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?

2
  • What is the MongoDB version(x,y,z)? Commented Oct 9, 2019 at 4:47
  • its mongodb 3.6
    – TheDataGuy
    Commented Oct 9, 2019 at 4:48

1 Answer 1

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 and acknowledge you have read our privacy policy.

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