English 中文(简体)
MOngoDB 在内存中找到带有参数装入整个文档的查询吗?
原标题:MongoDB find query with parameters loads whole document in memory or not?
  • 时间:2012-05-23 12:19:43
  •  标签:
  • mongodb

在 MOngoDB 中, 当我们通过字段名称作为第二个查找参数时, 查找参数是 Mongodb 将整个文档装入内存还是仅包含与这些字段相关的内存?

最佳回答

在 MOngoDB 服务器侧, 整个文档都存储在磁盘上。 由于 MOngoDB 使用内存映射文件, 任何文档访问都要求将整个文档装入内存。 查询运行后, 只有请求的字段被传输到客户端。 这意味着在客户端/ 驱动面, 只有请求的字段被存储在内存中, 而不是整个文档。

问题回答

暂无回答




相关问题
Access DB Ref MongoDB

Whats the best way to access/query a DB Ref: UPDATE: users: name, groupref : {$ref:"groups",$id:"ObjectId ..." } } groups: name, topic, country,...,.. Assumption is that user belongs to only one ...

MongoDB nested sets

What re the best practices to store nested sets (like trees of comments) in MongoDB? I mean, every comment can have a parent comment and children-comments (answers). Storing them like this: { ...

MongoMapper and migrations

I m building a Rails application using MongoDB as the back-end and MongoMapper as the ORM tool. Suppose in version 1, I define the following model: class SomeModel include MongoMapper::Document ...

MongoDB takes long for indexing

I have the following setup: Mac Pro with 2 GB of RAM (yes, not that much) MongoDB 1.1.3 64-bit 8 million entries in a single collection index for one field (integer) wanted Calling .ensureIndex(...) ...

Storing and accessing large amounts of data

My application creates pieces of data that, in xml, would look like this: <resource url="someurl"> <term> <name>somename</name> <frequency>somenumber</...

热门标签