Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.5.0
-
Triaged
-
Unknown
Description
For MIN aggregate without group by, N1QL sends Limit 1 queries in API2 e.g. if the aggregate is on the first column or aggregate on second column but first column has equality.
With API3, this optimization is no longer available.
Either:
1. Indexer can have the extra logic to determine when such optimizations can be applied
2. N1QL can call API2 in such cases with LIMIT 1 or API3 without pushing down group aggr.