【发布时间】:2020-07-20 07:55:31
【问题描述】:
我的模型中有这个字段:
author: { type: Schema.Types.ObjectId, ref: 'Author' }
现在我的数据库有超过 20k 的帖子,我想索引这个字段,我尝试从 studio 3t shell 执行这个命令:
db.post.createIndex({ author: 1 });
但是不行,查询还是很慢。
【问题讨论】:
标签: database mongodb nosql robo3t