-
Type: Investigation
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Original Downstream Change Summary
Users can drop the shard key index for hashed shard keys in 5.0, 6.0 and 7.0.
Description of Linked Ticket
Epic Summary
Summary
This project is a backport for Make Shard Key Index Optional for Hashed Sharding (PM-3398). Allow dropping the index for a hashed shard key after the collection is sharded.
Motivation
This project speeds up mongosync when synchronizing collections with hashed sharding. From preliminary performance testing, it is evident that dropping the hashed shard key index adds at least a 10% increase in insert performance. This is due to 2 reasons:
- the minimum number of indexes for a collection with a hashed shard key goes from 2 to 1
- hashed indexes are known to degrade performance due to cache refreshes.
Thus, backporting this project will enable significant performance gains for customers on older versions of MongoDB.