mongodb2.2更新内容

主要的更新如下:

1.新增了聚合框架

  聚合框架,使得它可以做聚合操作,而无需使用map-reduce。
  比如 数据结构如下:{"_id":"10280","city":"NEW YORK","state":"NY","pop":5574,"loc":[-74.016323,40.710537]}
  要返回所有国家,人口超过1000万,使用下面的聚合操作:db.zipcodes.aggregate( { $group :
                         { _id : "$state",
                           totalPop : { $sum : "$pop" } } },
                       { $match : {totalPop : { $gte : 10*1000*1000 } } } )

2.Improved Data Center Awareness with Tag Aware Sharding
MongoDB 2.2 adds additional support for geographic distribution or other custom partitioning for sharded collections in clusters. 
By using this “tag aware” sharding, you can automatically ensure that data in a sharded database system is always on specific shards. 
For example, with tag aware sharding, you can ensure that data is closest to the application servers that use that data most frequently.

Shard tagging controls data location, and is complementary but separate from replica set tagging, which controls read preference and write concern. 
For example, shard tagging can pin all “USA” data to one or more logical shards, 
while replica set tagging can control which mongod instances (e.g. “production” or “reporting”) the application uses to service requests.


See the documentation for the following helpers in the mongo shell that support tagged sharding configuration:


sh.addShardTag()
sh.addTagRange()
sh.removeShardTag()
Also, see the wiki page for tag aware sharding.

3.并发改进

  MongoDB的2.2增加了服务器的并发操作能力,现在支持数据库级锁定。


详情见,官方地址:http://docs.mongodb.org/manual/release-notes/2.2/#changes

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值