"errmsg" : "distinct too big, 16mb cap",
repl_test:PRIMARY> show dbs
admin 0.000GB
direct_vote_resource 16.487GB
local 14.860GB
personas 30.809GB
recommendation 0.370GB
statistics_visit 0.138GB
superpub 75.234GB
test 0.000GB
repl_test:PRIMARY> use superpub
switched to db superpub
repl_test:PRIMARY> db.ask.count()
123989434
repl_test:PRIMARY> db.ask.find({}).limit(1)
{ "_id" : ObjectId("5b1103341ac2386e164dd796"), "md5" : "b1b791efdb4745e0", "ans wer" : "成本和37砖混的差不多的、、不过保温隔热效果好的", "likenum" : 0, "keyword " : "海容", "question" : "用海容模块建大棚成本高不高??" }
repl_test:PRIMARY> db.ask.distinct("md5").limit(3)
2018-11-23T15:27:29.186+0800 E QUERY [main] Error: distinct failed: {
"ok" : 0,
"errmsg" : "distinct too big, 16mb cap",
"code" : 17217,
"codeName" : "Location17217"
} :
DBCollection.prototype.distinct@src/mongo/shell/collection.js:1745:1
@(shell):1:1
repl_test:PRIMARY>
repl_test:PRIMARY> db.ask.aggregate([{$match:{}}, {$project:{"md5":true}}, {$group:{_id:"$md5"}}, {$group:{_id:null, count:{$sum:1}}}])
assert: command failed: {
"ok" : 0,
"errmsg" : "Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in.",
"code" : 16945,
"codeName" : "Location16945"
} : aggregate failed
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:16:14
assert.commandWorked@src/mongo/shell/assert.js:370:5
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
@(shell):1:1 2018-11-23T15:42:40.779+0800 E QUERY [main] Error: command failed: {
"ok" : 0,
"errmsg" : "Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in.",
"code" : 16945,
"codeName" : "Location16945"
} : aggregate failed :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:16:14
assert.commandWorked@src/mongo/shell/assert.js:370:5
"errmsg" : "distinct too big, 16mb cap",的更多相关文章
- MongoDB 聚合查询报错
1.Distinct聚合查询报错 db.users.distinct("uname") db.runCommand({"distinct":"user ...
- MongoDB 聚合函数
概念 聚合函数是对一组值执行计算并返回单一的值 主要的聚合函数 count distinct Group MapReduce 1.count db.users.count() db.users.cou ...
- MongoDB常用命令
本文整理了一年多以来我常用的MongoDB操作,涉及mongo-shell.pymongo,既有运维层面也有应用层面,内容有浅有深,这也就是我从零到熟练的历程. MongoDB的使用之前也分享过一篇, ...
- MongoDB使用小结:一些常用操作分享
本文整理了一年多以来我常用的MongoDB操作,涉及mongo-shell.pymongo,既有运维层面也有应用层面,内容有浅有深,这也就是我从零到熟练的历程. MongoDB的使用之前也分享过一篇, ...
- 分布式系列文章——从ACID到CAP/BASE
事务 事务的定义: 事务(Transaction)是由一系列对系统中数据进行访问与更新的操作所组成的一个程序执行逻辑单元(Unit),狭义上的事务特指数据库事务. 事务的作用: 当多个应用程序并发访问 ...
- 分布式系统理论基础 - CAP
引言 CAP是分布式系统.特别是分布式存储领域中被讨论最多的理论,“什么是CAP定理?”在Quora 分布式系统分类下排名 FAQ 的 No.1.CAP在程序员中也有较广的普及,它不仅仅是“C.A.P ...
- {"errcode":40097,"errmsg":"invalid args hint: [vjNe7xxxxxx8vr19]"}——记录一次微信错误处理
错误情况概述: 启动应用之后,微信调用 相机拍照 等接口是可以正常使用的, 但是过了一段时间(2个小时左右--token/jsapi_ticket的过期时间),微信调用相机拍照的功能失效,启用debu ...
- [LeetCode] Longest Substring with At Most K Distinct Characters 最多有K个不同字符的最长子串
Given a string, find the length of the longest substring T that contains at most k distinct characte ...
- [LeetCode] Longest Substring with At Most Two Distinct Characters 最多有两个不同字符的最长子串
Given a string S, find the length of the longest substring T that contains at most two distinct char ...
随机推荐
- 搞笑的<Button></Button>
<button>竟然默认是submit按钮</button>.........................
- 【Java面试题】27 多线程笔试面试概念问答
第一题:线程的基本概念.线程的基本状态及状态之间的关系? 线程,有时称为轻量级进程,是CPU使用的基本单元:它由线程ID.程序计数器.寄存器集合和堆栈组成.它与属于同一进程的其他线程共享其代码段.数据 ...
- 存储过程不返回记录集导致ADO程序出错
HRESULT _hr = get_adoEOF(&_result); IsEOF()函数如下:其中ADOCG::_RecordsetPtr m_pRecordset; BOOL IsEOF( ...
- 利用GetType反射方法再调用方法进行传递参数实现调用
直接上代码: TestMenuService.MenuServiceCSClient tesClient = new TestMenuService.MenuServiceCSClient(); va ...
- linux vi编辑器中,如何通过快捷键上下翻页?
需求说明: 之前在vi的时候,如果想看下一页,就直接按住 ↓ 这个箭头一直翻,现在觉得有些麻烦, 就找了下上,下翻页的快捷方式.在此记录下. 记录: 1.向下翻页快捷键(下一页):Ctrl + f 2 ...
- mysql通过mysql_install_db初始化数据目录时使用--user选项的作用是什么?
需求描述: mysql数据库通过mysql_install_db初始化数据目录时,使用了--user选项,这里记录下该参数的作用 参数解释: 1.--user的作用:就是以哪个操作系统用户来执行mys ...
- 【ExtJs】 ExtJs4.2 基本表单组件的使用
包含ExtJs 基本的组件radioGroup,ComboBox,File,NumberField... <%-- Created by IntelliJ IDEA. User: Adminis ...
- ubuntu网页无法看视频
sudo apt-get install flashplugin-nonfree sudo apt-get install aptitude sudo aptitude install ubuntu- ...
- Landpy.ActiveDirecoty,按照Active Record Pattern设计的方便Lib开源发布
想方便的操作AD吗,不想记住那么多AD Attribute名称和常量?请使用Landpy.ActiveDirecoty库,按照Active Record Pattern设计的AD Lib已经在Code ...
- ios开发 int,NSInteger,NSUInteger,NSNumber
分享一下,在工作工程中遇到的一些不留心的地方: 1.当需要使用int类型的变量的时候,可以像写C的程序一样,用int,也可以用NSInteger,但更推荐使用NSInteger,因为这样就不用考虑设备 ...