fullCount performance #4801
fullCount performance #4801
Comments
Using
with
In this example, the Can you provide an example of the query that is particularly slow with |
We should explain this here too: https://docs.arangodb.com/3.3/AQL/ExecutionAndPerformance/QueryStatistics.html |
@dothebart: go ahead! |
my query is similar to for log in logs sort log.date limit 0, 20 return log there are about 500k docs. It runs in about 200ms with full count on, 2ms with full count off. fwiw to get the count manually im adding this to the same query COLLECT WITH COUNT INTO length RETURN length |
@ldap4life : ok, if there is a sorted index present on the If your original query does not contain any filters, the counting is probably most efficiently done by using just |
Could this be detected by optimizer ? For example, if a query has no FILTER statement, return collection size as fullCount instead of iterating over every document ? |
my environment running ArangoDB
I'm using the latest ArangoDB of the respective release series:
Mode:
Storage-Engine:
On this operating system:
this is an AQL-related issue:
[ ] I'm using graph features
I'm issuing AQL via:
Doing aql queries with a limit and the fullCount option perform very poorly in my testing. It turns out to be faster to do the query with full count off, and then a second query to get the full count manually.
The text was updated successfully, but these errors were encountered: