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 for this feature is now planned. Will update when work on this feature starts and when it becomes generally available.
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.