i use MongoDB 2.0.5
i have document with two format
First:
doc1={_id:{w1:"he thong",w2:"thong tin"},value:33}->Object.bsonsize(doc1)=65bytes
Second:
doc2={w1:"he thong",w2:"thong tin",value:33}->Object.bsonsize(doc2)=55bytes
When i insert doc1 and doc2 into sam collection
Then i run
Object.bsonsize(db.mycollection.find({"_id.w1":"he thong"})) => 48 bytes
Object.bsonsize(db.mycollection.find({"w1":"he thong"})) => 48 bytes
Why size of document before and after insert to collection is difference? and two documents with differ size (doc2<doc1) but they are same size after insert into collection?
Thanks alot!!!
Phuc