Acording to https://www.arangodb.com/docs/stable/aql/examples-counting.html this two queries should be equivalent.
Best regards, Alexander. On Monday, July 26, 2021 at 9:41:59 PM UTC+3 [email protected] wrote: > Since your COLLECT function has no specific aggregate target, I would > assume that it's doing some funky calculations with each document. > Whatever the process, it's giving you a count of unique values, probably > across all attributes of all documents, not total items. > > Try changing your COLLECT statement to this: > ... COLLECT one = 1 WITH COUNT INTO ... > > -- Kerry > On Monday, July 26, 2021 at 2:45:55 AM UTC-7 Alexander wrote: > >> Hello. >> The query >> RETURN { >> a: (FOR m IN collection COLLECT WITH COUNT INTO length RETURN >> length)[0], >> b: LENGTH( collection), >> } >> returns next result: [{ "a": 142058379, "b": 142050050 }]. >> >> How this could be? ArangoDB is deployed in single 3.7.6 instance. >> >> Best regards, >> Alexander. >> > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/73b6fe6c-3c50-4697-818f-ffd2e4ce43b8n%40googlegroups.com.
