Is findOne () in MongoDB equivalent to LIMIT 1 in SQL?

  mongodb, question

See this about addingLIMIT 1The question of whether it will be faster,http://segmentfault.com/q/10100000001 …
The old cow reminds me of mongodbfindOne

db.collection.findOne(query)

I don’t know if it is the same as SQL, or if it is the same as SQL.db.collection.find().limit(1)The same?

The limit () function in mongoDB is the same as the limit in sql. The limit () function in mango is also used after the find () function.