报错:
Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.
MongoDB Server对于Sort排序能够支持的最大内存限制查看:
[root@database ~]# mongo
MongoDB shell version v3.4.24
> use admin
switched to db admin
>db.runCommand({ getParameter : 1, "internalQueryExecMaxBlockingSortBytes" : 1 } )
{ "internalQueryExecMaxBlockingSortBytes" : 33554432, "ok" : 1 } #确认为32M
设置大小:
> db.adminCommand({setParameter:1, internalQueryExecMaxBlockingSortBytes:335544320})
{ "was" : 33554432, "ok" : 1 }







![[Golang实战] sql建表,不用外键,多个表之间如何建立起联系?](https://img-blog.csdnimg.cn/751d11b20ecc44efb82aab4fb80d07aa.png)












