- What happens if a field has 2 indexes, a hashed one and the default b-tree one?
- Specifically, what happens if I create an additional hashed index on the
_idfield, which by default is indexed?
- When I query to find a document with a specific
_id, which index will mongo use?
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.– Community BotJan 27 at 21:19
What is your motivation in creating the second index?– user20042973Feb 26 at 4:15
Hashed index has O(n) of 1– Bear Bile Farming is TortureFeb 26 at 4:27