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.

    Enable/disable AQL query tracking

    —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.

    —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 —query.tracking 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.

    Threshold for slow AQL queries

    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

    —query.optimizer-max-plans value

    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.optimizer-rules

    This option can be used to to selectively enable or disable AQL query optimizerrules by default. The option can be specified multiple times, and takes thesame input as the query option of the same name.

    For example, to turn off the rule by default, use

    The purpose of this startup option is to be able to enable potential futureexperimental optimizer rules, which may be shipped in a disabled-by-defaultstate.

    AQL Query results caching mode

    —query.cache-mode

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

    AQL Query results cache size

    —query.cache-entries

    Maximum number of query results that can be stored per database-specific queryresults cache. If a query is eligible for caching and the number of items in thedatabase’s query cache is equal to this threshold value, another cached queryresult will be removed from the cache.

    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.

    —query.cache-entry-max-size

    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.

    The default value is false.