how is the query performance impacted when using prefix index versus index specifically for that query? Example:
I have 2 different queries.
For the first query I can use this index: field1_-1. (takes up 100 MB for millions of documents)
For the second query I can use this compound index: field1_-1_field2_-1_field3_-1_field4_1 (takes up 1 GB for millions of documents).
So my question is:
Is it still useful to use prefix index (e.g. use the second index for the first query), when the second index takes up much more space and when querying, will be using more RAM for the first query than it would using the first index? Or is the space the indexes take up does not indicate that there will be higher usage of RAM, therefore slower query, where unnecessary? (there is no concern about write speeds, only for reading purposes)