The difference between the request times should be almost negligible, since both of them limit the boundaries of the unique _id, so they will be found immediately. The only slight advantage here is count , because db will return int instead of the whole document. Thus, the time you save is solely due to the transfer of data from db to the client.
If you want your task to make a type request and you do not need data, use count
source share