mongoDB 大数据量排序索引

 最近发现系统中单表数据量超过2w之后,报如下错误

too much data for sort() with no index.  add an index or specify a smaller limit

经查询发现,排序字段未加索引导致,以前用关系型数据库时,貌似没有这种说法。现在使用mongoDB时却出现了这个问题,索引加好,问题解决!

猜你喜欢

转载自orange2008.iteye.com/blog/1754168