Currently I have a collection
events with an attribute
createdAt of type date (for example 2019/09/09 10:32:12.123).
Because my users search a lot by date, I added an index on this attribute. There are probably hundred of thousands items in my collection and most of these events have a different createdAt date (which means a different index value).
My users are complaining that it takes too much time to retrieve some data, so I'm looking for a way to improve that.
As my users only search by date (never with time), I was wondering if creating another attribute 'createdAtDateOnly' (keep only the date and set the time to 00:00, for example: 2019/09/09 00:00:00) would be faster to search because many 'events' in my collection would have the same index.