mongos> db.messages.count()
120477
mongos> db.messages.getIndexes()
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"name" : "_id_",
"ns" : "enron.messages"
},
{
"v" : 1,
"key" : {
"headers.From" : 1,
"headers.Date" : 1
},
"name" : "headers.From_1_headers.Date_1",
"ns" : "enron.messages"
}
]
mongos> db.messages.find({},{_id:0,'headers.From':1,'headers.Subject':1,'headers.Date':1}).sort({'headers.Date':1}).batchSize(10);
{ "headers" : { "Date" : ISODate("2001-02-01T06:10:00Z"), "From" : "tracy.geaccone@enron.com", "Subject" : "Re: Transition Issues" } }
{ "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } }
{ "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } }
{ "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } }
{ "headers" : { "Date" : ISODate("2001-02-01T06:53:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Re: P+ spread options" } }
{ "headers" : { "Date" : ISODate("2001-02-01T06:53:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Re: P+ spread options" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:07:00Z"), "From" : "phil.demoes@enron.com", "Subject" : "Re: Transco Z4/Z5 curves for Piedmont" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:07:00Z"), "From" : "phil.demoes@enron.com", "Subject" : "Re: Transco Z4/Z5 curves for Piedmont" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:30:00Z"), "From" : "michael.tribolet@enron.com", "Subject" : "Re: LA Times article" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:30:00Z"), "From" : "michael.tribolet@enron.com", "Subject" : "Re: LA Times article" } }
Type "it" for more
mongos> it
{ "headers" : { "Date" : ISODate("2001-02-01T07:32:00Z"), "From" : "chris.germany@enron.com", "Subject" : "Re: Insurance dough" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:32:00Z"), "From" : "chris.germany@enron.com", "Subject" : "Re: Insurance dough" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
{ "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
Error: error: {
"$err" : "getMore executor error: Overflow sort stage buffered data usage of 33557210 bytes exceeds internal limit of 33554432 bytes",
"code" : 17406
}