I am developing an API using Codeigniter and MongoDB. In this system I am saving the full name and _ID of users that the selected user is following.
What is best to
Performance for requests (and updates) are really better with objectid. More over, objectid are quite small in space.
From the official doc :
BSON includes a binary data datatype for storing byte arrays. Using this will make the id values, and their respective keys in the _id index, twice as small.
here are 2 links that can help you : - http://www.mongodb.org/display/DOCS/Optimizing+Object+IDs - http://www.mongodb.org/display/DOCS/Object+IDs