ArangoDB v2.8 reached End of Life (EOL) and is no longer supported.
This documentation is outdated. Please see the most recent version here: Try latest
Module “queries”
The query module provides the infrastructure for working with currently running AQL queries via arangosh.
Properties
queries.properties()
Returns the servers current query tracking configuration; we change the slow query threshold to get better results:
Currently running queries
We create a task that spawns queries, so we have nice output. Since this task
uses resources, you may want to increase period
(and not forget to remove it… afterwards):
The function returns the currently running AQL queries as an array.
Slow queries
The function returns the last AQL queries that exceeded the slow query threshold as an array:
arangosh> queries.slow();
[ ]
Clear slow queries
Clear the list of slow AQL queries:
arangosh> queries.clearSlow(); arangosh> queries.slow();
{
"code" : 200
}
[ ]
Kill
Kill a running AQL query:
arangosh> var runningQueries = queries.current().filter(function(query) {
........> return query.query === theQuery;
........> });
arangosh> queries.kill(runningQueries[0].id);
{
"code" : 200
}