Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1520472
  • 博文数量: 399
  • 博客积分: 8508
  • 博客等级: 中将
  • 技术积分: 5302
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-14 09:28
个人简介

能力强的人善于解决问题,有智慧的人善于绕过问题。 区别很微妙,小心谨慎做后者。

文章分类

全部博文(399)

文章存档

2018年(3)

2017年(1)

2016年(1)

2015年(69)

2013年(14)

2012年(17)

2011年(12)

2010年(189)

2009年(93)

发布时间:2015-05-21 18:13:15

一般来说,如果索引包含N个键,则按照顺序对于其任意前缀的查询都会有帮助。比如已有索引 {“a”:1, “b”:1, “c”:1, “d”:1, “e”:1},实际上是有了{“a”:1} , {“a”:1, “b”:1},{“a”:1, “b”:1, “c”:1}, {“a”:1, “b”:1, “c”:1, “d”:1},{.........【阅读全文】

阅读(2358) | 评论(0) | 转发(0)

发布时间:2015-04-26 16:46:19

mongod --master --dbpath=database/mongod --port 8888 --slave --source=127.0.0.1:27017 --dbpath=database_slave_1/mongo shell>  db.tickets.find()>  db.tickets.drop()> db.tickets.count()> db.tickets.getIndexes()> db.getProfilingLevel()> db.setProfilingLevel(2)> db.getProfili.........【阅读全文】

阅读(1163) | 评论(0) | 转发(0)

发布时间:2015-04-26 16:43:18

map = function() { emit(this.school_number, this.ticket_number) };reduce = function(key, value){ return Array.sum(',' + value).slice(1); };db.tickets.mapReduce(map, reduce, {out: {inline:1}})db.tickets.mapReduce(map, reduce, {out: {inline:1}, query: {"school_bucket": "1"}})db.tickets.mapRedu.........【阅读全文】

阅读(1204) | 评论(1) | 转发(0)
给主人留下些什么吧!~~

我本痴情2013-12-26 15:33

谢谢你的分享,收益颇多,谢谢

回复  |  举报

shiluodan2013-08-08 20:55

还只是菜鸟,不过还是希望能看到那些很厉害的博文。很感谢你的分享。

回复  |  举报
留言热议
请登录后留言。

登录 注册