ArangoDB Server Query Options

    The default maximum amount of memory (in bytes) that a single AQL query can use.When a single AQL query reaches the specified limit value, the query will beaborted with a resource limit exceeded exception. In a cluster, the memoryaccounting is done per shard, so the limit value is effectively a memory limit perquery per shard.

    The global limit value can be overridden per query by setting the _memoryLimit_option value for individual queries when running an AQL query.

    The default value is 0, meaning that there is no memory limit.

    Turning AQL warnings into errors

    —query.fail-on-warning value

    When set to true, AQL queries that produce warnings will instantly abort andthrow an exception. This option can be set to catch obvious issues with AQLqueries early. When set to false, AQL queries that produce warnings will notabort and return the warnings along with the query results.The option can also be overridden for each individual AQL query.

    —query.tracking flag

    If true, the server’s AQL slow query tracking feature will be enabled bydefault. Tracking of queries can be disabled by setting the option to false.

    The default is true.

    Enable/disable tracking of bind variables in AQL queries

    —query.tracking-with-bindvars flag

    If true, then the bind variables will be tracked and shown for all running and slow AQL queries. When set to true, this will also enable the display ofbind variable values in the list of cached AQL query results.This option only has an effect if was set to true or whenthe query results cache is used. Tracking and displaying bind variable values can be disabled by setting the option to false.

    The default is true.

    By setting value it can be controlled after what execution time an AQL queryis considered “slow”. Any slow queries that exceed the execution time specifiedin value will be logged when they are finished. The threshold value isspecified in seconds. Tracking of slow queries can be turned off entirely bysetting the option —query.tracking to false.

    The default value is 10.0.

    —query.slow-streaming-threshold value

    By setting value it can be controlled after what execution time streaming AQL queries are considered “slow”. This option exists to give streaming queries aseparate, potentially higher timeout value than regular queries. Streaming queriesare often executed in lockstep with application data processing logic, which thenalso accounts for the queries’ runtime. It is thus not unexpected if streaming queries’ lifetime is longer than the one of regular queries.

    The default value is 10.0.

    Limiting the number of query execution plans created by the AQL optimizer

    By setting value it can be controlled how many different query execution plansthe AQL query optimizer will generate at most for any given AQL query. Normallythe AQL query optimizer will generate a single execution plan per AQL query, butthere are some cases in which it creates multiple competing plans. More planscan lead to better optimized queries, however, plan creation has its costs. Themore plans are created and shipped through the optimization pipeline, the moretime will be spent in the optimizer.Lowering value will make the optimizer stop creating additional plans when ithas already created enough plans.Note that this setting controls the default maximum number of plans to create. Thevalue can still be adjusted on a per-query basis by setting the _maxNumberOfPlans_attribute when running a query.

    The default value is 128.

    —query.cache-mode

    Toggles the AQL query results cache behavior. Possible values are:

    • off: do not use query results cache
    • on: always use query results cache, except for queries that have their cache_attribute set to _false
    • demand: use query results cache only for queries that have their cache_attribute set to _true

    AQL Query results cache size

    —query.cache-entries

    This option only has an effect if the query cache mode is set to either on ordemand.

    The default value is 128.

    —query.cache-entries-max-size

    Maximum cumulated size of query results that can be stored per database-specific query results cache. When inserting a query result into the query results cache,it is check if the total size of cached results would exceed this value, and if so,another cached query result will be removed from the cache before inserting a newone.

    This option only has an effect if the query cache mode is set to either on ordemand.

    The default value is 256 MB.

    Maximum size of individual query results that can be stored in any database’s query results cache. Query results are only eligible for caching when their size does not exceedthis setting’s value.

    The default value is 16 MB.

    —query.cache-include-system-collections

    Whether or not to store results of queries that involve system collections inthe query results cache. Not storing these results is normally beneficial when using thequery results cache, as queries on system collections are internal to ArangoDB and willonly use space in the query results cache unnecessarily.