Skip to main content
added [query-performance] to 2412 questions - Shog9 (Id=1924)
Link
edited body
Source Link
leonz
  • 143
  • 4

Optimizing large MongoDB database queries doing filtering on unindexed fields in large MongoDB collection

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.

Optimizing large MongoDB database queries doing filtering on unindexed fields

We have a large MongoDB database, 3TB and growing a lot. The database 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 database 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 database 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.

Optimizing queries doing filtering on unindexed fields in large MongoDB collection

We have a large MongoDB collection, 6TB and growing a lot. The collection 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 collection 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 collection 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.

Source Link
leonz
  • 143
  • 4

Optimizing large MongoDB database queries doing filtering on unindexed fields

We have a large MongoDB database, 3TB and growing a lot. The database 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 database 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 database 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.