MongoDB 查询超时异常 SocketTimeoutException

在对超过百万条记录的集合进行聚合操作。 DBObject match=(DBObject)JSON.parse("{$match:{logType:{'$in':[5,9]}}}");
DBObject group=(DBObject)JSON.parse("{$group:{'_id':'$domainUrl','count':{'$sum':1}}}");
AggregationOutput output = logCollection.aggregate(match,group); 偶尔会发生Read timed out…
From:http://www.oschina.net/blog

标签