Misc

Maximum Document Size

MongoDB limits the data size of individual BSON objects/documents. At the time of this writing the limit is 16MB.並不是技術上的限制,只是一個規定而已。

Specifically, BSON strings are UTF-8.

 A few notes:

  • MongoDB regex queries support UTF-8 in the regex string.
  • Currently, sort() on a string uses strcmp: sort order will be reasonable but not fully international correct.  Future versions of MongoDB may support full UTF-8 sort ordering.
???
Timestamps are stored as 64 bit values which, on a single mongod, are guaranteed unique. The first 32 bits are a time_t value (seconds since the UTC epoch). The second 32 bits are an incrementing ordinal for operations within a given second.

MongoDB uses the Timestamp datatype as "OpTimes" in the replication oplog's ts field.


Timestamps have special semantics when null. If null, and the timestamp is one of the first two fields of the object, the timestamp will automatically be converted to a unique value. (It must be one of the first two top level fields of the document for performance reasons; the entire document is not scanned for timestamps.)

this is used for internal increment values. for storing normal dates in MongoDB, you should use java.util.Date time is seconds since epoch inc is an ordinal


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章