We have a large MongoDB databasecollection, 3TB6TB and growing a lot. The databasecollection is used for user and automated feedback, and as such will be used for all sorts of analytics. One document has about 20 fields. Since databasecollection is used for analytics, filtered fields can be of any combination and as such, creating indexes for every combination would be too much.
Is there a good way to index databasecollection for such (random-like) queries? If not, is there a way to optimize queries themselves?
If this can help with optimizing, queries are paged.
Example query:
db.usage.find({"appVersion": "4.0.0.0", "expression": "abcd"})
where appVersion
is not indexed.