mongodb - Should I stringify part of document, that are not used in the query -


i have collection document similar this:

{   name: 'foo',   age: 25,   extrainfo: {     // big, complex many level nesting, , different between document.   }, } 

i query document based name, age properties. don't care extrainfo property. it's complex. not know whether reduces performance of query process. do extrainfo. should stringify , compress before insert collection.?

i avoid stringifying embedded documents makes them impossible use later down line. understand there no current requirement data used knows requirements tomorrow bring. it's better plan future block in corner.

it'll same amount of performance if you're creating strings of embedded objects compared serializing them in bson.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -