We are trying to use below JS for retriveing 3 million records from a collection.
function()
{
var result = db.Token_Details_copy.find({cProductCode : "Appname"});
return result.toArray();
}
Now the problem is while we are able to fetch all records but while converting to array we are getting exception as below.
uncaught exception: { "errmsg" : "exception: Converting from JavaScript to BSON failed: Object size 66590368 exceeds limit of 16793600 bytes.", "code" : 17260, "ok" : 0 }
Please suggest.
Sample document as below. So similar documents are being fetched for 3 Million records.
{
"_id" : ObjectId("54eef98df50867d23740d791"),
"cPlatform" : "",
"iTokenId" : NumberLong(25741),
"cProductCode" : "",
"ctokenCode" : "",
"bIsDevelopment" : "",
"cDeviceDetails" : "",
"dCreatedDate" : ISODate("2012-11-25T02:06:02.233Z"),
"iProductId" : 176,
"cDeviceId" : "",
"cOSVersion" : "",
"cUserName" : "",
"cEmail" : "",
"cCity" : ""
}