【文件属性】:
文件名称:MongoDB性能优化
文件大小:145KB
文件格式:PDF
更新时间:2014-10-20 08:33:41
MongoDB
MongoDB性能优化
查询操作的优化
假设我们按照时间戳查询最近发表的10篇博客文章:
articles = db.posts.find().sort({ts:-1}); // get blog posts in reverse time order
for (var i=0; i< 10; i++) {
print(articles[i].getSummary());
}
优化#1: 创建索引