There is a collection with a sharding key on the hashed index file_id . In addition, commonly used queries in the business require both id2 and version as query conditions. (it will contain file_id in the query condition as well for shard routing) . For example: find({file_id: 'xxx', id2: 'xxx'}).sort({version: -1}).limit(100)
Given that I already have the hashed index file_id, do I still need to create a compound index (file_id, id2, version) ? Or is it sufficient to create an index on (id2, version) only?