python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Is it efficient to store sha256 hash of username in _id field in MongoDB?
I have a special need to hash the username, and also I need to keep the usernames unique for my purpose. So, my question is can I override default '_id' field of mongoDB with sha256 hash of username? ...
Prithvi Reddy
Votes: 0
Answers: 1
What if some documents don't have a field that is part of an index?
A collection has an indexed involved field_A. But field_A is not required. So what happens if some documents do not have this field? Will the index still work for documents that do have this field?

Bear Bile Farming is Torture
Votes: 0
Answers: 2
Which query faster on MongoDB with two index
I have two index in mongodb. First index field is "string" and second index field is "date". String field is partial. Why faster than I query "string" with "date&quo...
Murat Aslan
Votes: 0
Answers: 1
MongoDB TTL index never deletes records
I created an index as shown below and added a createdAt field to each new record added to the db. The records should be auto-deleted after 24 hours however I have waited days and nothing has been dele...
Amber Johnson
Votes: 0
Answers: 1