<code class="language-js">db.gameapp.aggregate([
{
$match: {name: 'qysg10001'}
},{
$lookup: {
from: 'hosts',
localField: 'host_name',
foreignField: 'hname',
as: 'host_info'
}
}
])</code>
已经在hosts表的hname上建立了索引,这次lookup能使用这个索引吗
xiaoxu 已回答的问题
MongoDB中文社区