DISTINCT should use index if possible
Currently one can query distinct values from documents using the DISTINCT keyword like in relational SQL.
SELECT distinct c.myField FROM c
Unfortunately current DISTINCT is rather unusable as it seems to do a full scan even if there is an index present on the field. This feature does save some bandwidth when you really-really-really need this feature, but the RU consumption part is borderline-unacceptable for production use.
Please consider improving the implementation to avoid full scan and use index, if possible.
Work on this feature has started. Will update again when complete.
Marcin Winczaszek commented
Any update on expected release of this feature?
Dennis Milandt commented
Indeed, this feature would be a nice improvement. Any updates?
What is the status of the implementation of this feature? Would be really great if this could become available.
hi team, When can we expect this feature? It is consuming a lot of RU for an item in the index.