开发者

mongodb:Can sharding improve query performance?

开发者 https://www.devze.com 2023-02-02 01:45 出处:网络
开发者_开发知识库Hi I have a table with very large data,can the sharding improve the query performance?If you generate an appropriate key that allows MongoDB to shard (see their documentation on how t
开发者_开发知识库

Hi I have a table with very large data,can the sharding improve the query performance?


If you generate an appropriate key that allows MongoDB to shard (see their documentation on how to do this), and you have multiple disk drives, then the simple answer is yes.

At their last major pre-release (when sharding was demo'd), they have an 8-server configuration, each with sharding, and were getting a million rows/sec.


It depends... If there are a lot of concurrent reads/writes going on, they potentially yes. However if it is just a single process accessing a dataset which resides on a single (local) host then probably not.

Also, mongodb is a key-value type database, so it is very optimized for single value lookups. Basically, more is needed about your use case to give you a good answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消