Monday, 14 September 2020

Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.

 

Error: 

Error: error: {

        "ok" : 0,

        "errmsg" : "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.",

        "code" : 96,

        "codeName" : "OperationFailed"

}


Solution: 

         when you execute query on large collection that time error will come. use limit() method to get data.

db.employees.find().sort({employee_id: 1 } ).limit(1)




No comments:

Post a Comment

make: perl: Command not found make: *** [ins_rdbms.mk:573: javavm_refresh] Error 127 '

 Error:  Patching component oracle.javavm.client, 19.0.0.0.0... Make failed to invoke "/usr/bin/make -f ins_rdbms.mk javavm_refresh ORA...