我有一个集合(约900k的文档和计数)。您可以在附件中看到的doc方案。我想要通过任何字段组合中的任何子文档中的几乎每个字段进行搜索。例如:如何提高MongoDB中多字段搜索的性能?
# search 1
updated_at > now() and make.id = 10 and model.id = 20
# search 2
region.id = 10 and details.year >= 2000 and details.body = 'sedan'
设备: 4×的Intel Xeon E5-2650在2.60GHz,16 GB RAM,SSD磁盘,SDD驱动器上8GB交换。
应用程序依赖项: python 3.6,Django,mongoengine,pymongo。
这里更多的信息:
Sample document, Indices setup, Database and server status
到目前为止您尝试过什么? –
不多,各种指数组合,集结。 –