Using MongoDB's for storing files of size est. 500KB -


in gridfs faq there said 1 should store in aforementioned gridfs files of size >16mb. have lot of files ~500kb.

question is: approach more efficient - storing files' content inside document or storing file in gridfs? should consider other approaches?

as efficiency, either approach same. gridfs implemented @ driver level paging >16mb data across multiple documents. mongodb unaware you're storing "file", knows how store documents , doesn't ask questions.

so, depending on driver (php/nodejs/ruby), may find metadata features nice , opt use gridfs because of that. otherwise, if absolutely sure document not larger 16mb, storing raw content in document should simple , fast (or faster).

generally, i'd recommend against storing files in database. can have negative impact on working set , overall speed.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -