当前位置:Gxlcms > 数据库问题 > mongodb Sort排序能够支持的最大内存限制为32M Plan executor error during find: FAILURE

mongodb Sort排序能够支持的最大内存限制为32M Plan executor error during find: FAILURE

时间:2021-07-01 10:21:17 帮助过:6人阅读

sort order, the result will not include a SORT stage. Otherwise, if MongoDB cannot use the index to sort, the explain result will include a SORT stage. 意思大概是如果MongoDB可以使用索引扫描来进行排序,那么结果将不包括SORT stage。否则如果MongoDB无法使用索引进行排序,那么查询计划将包括SORT stage。 使用索引扫描的效率是远大于直接将结果集放在内存排序的,所以MongoDB为了使查询语句更有效率的执行,限制了 排序内存的使用,因而规定了只能使用 32M,该种考虑是非常合理的。 但也可通过手工调整参数进行修改(不建议): # 比如调大到 128M ## 在线调整 > db.adminCommand({setParameter:1, internalQueryExecMaxBlockingSortBytes:134217728}) ## 持久到配置文件 setParameter: internalQueryExecMaxBlockingSortBytes: 134217728

 

mongodb Sort排序能够支持的最大内存限制为32M Plan executor error during find: FAILURE

标签:min   code   ror   场景   大内存   cut   god   Plan   ann   

人气教程排行