docs/src/main/sphinx/admin/properties-query-management.md
query.client.timeoutprop-type-duration5mConfigures how long the cluster runs without contact from the client application, such as the CLI, before it abandons and cancels its work.
query.execution-policyprop-type-stringphasedexecution_policyConfigures the algorithm to organize the processing of all the stages of a query. You can use the following execution policies:
phased schedules stages in a sequence to avoid blockages because of
inter-stage dependencies. This policy maximizes cluster resource utilization
and provides the lowest query wall time.all-at-once schedules all the stages of a query at one time. As a
result, cluster resource utilization is initially high, but inter-stage
dependencies typically prevent full processing and cause longer queue times
which increases the query wall time overall.query.determine-partition-count-for-write-enabledprop-type-booleanfalsedetermine_partition_count_for_write_enabledEnables determining the number of partitions based on amount of data read and processed by the query for write queries.
query.max-hash-partition-countprop-type-integer100max_hash_partition_countThe maximum number of partitions to use for processing distributed operations, such as joins, aggregations, partitioned window functions and others.
query.min-hash-partition-countprop-type-integer4min_hash_partition_countThe minimum number of partitions to use for processing distributed operations, such as joins, aggregations, partitioned window functions and others.
query.min-hash-partition-count-for-writeprop-type-integer50min_hash_partition_count_for_writeThe minimum number of partitions to use for processing distributed operations in write queries, such as joins, aggregations, partitioned window functions and others.
query.max-writer-task-countprop-type-integer100max_writer_task_countThe maximum number of tasks that will take part in writing data during
INSERT, CREATE TABLE AS SELECT and EXECUTE queries.
The limit is only applicable when redistribute-writes or scale-writers is enabled.
query.low-memory-killer.policyprop-type-stringtotal-reservation-on-blocked-nodesConfigures the behavior to handle killing running queries in the event of low memory availability. Supports the following values:
none - Do not kill any queries in the event of low memory.total-reservation - Kill the query currently using the most total memory.total-reservation-on-blocked-nodes - Kill the query currently using the
most memory specifically on nodes that are now out of memory.:::{note}
Only applies for queries with task level retries disabled (retry-policy set to NONE or QUERY)
:::
task.low-memory-killer.policyprop-type-stringtotal-reservation-on-blocked-nodesConfigures the behavior to handle killing running tasks in the event of low memory availability. Supports the following values:
none - Do not kill any tasks in the event of low memory.total-reservation-on-blocked-nodes - Kill the tasks that are part of the queries
which have task retries enabled and are currently using the most memory specifically
on nodes that are now out of memory.least-waste - Kill the tasks that are part of the queries
which have task retries enabled and use significant amount of memory on nodes
which are now out of memory. This policy avoids killing tasks which are already
executing for a long time, so significant amount of work is not wasted.:::{note}
Only applies for queries with task level retries enabled (retry-policy=TASK)
:::
query.max-execution-timeprop-type-duration100dquery_max_execution_timeThe maximum allowed time for a query to be actively executing on the cluster, before it is terminated. Compared to the run time below, execution time does not include analysis, query planning or wait times in a queue.
query.max-lengthprop-type-integer1,000,0001,000,000,000The maximum number of characters allowed for the SQL query text. Longer queries
are not processed, and terminated with error QUERY_TEXT_TOO_LARGE.
query.max-planning-timeprop-type-duration10mquery_max_planning_timeThe maximum allowed time for a query to be actively planning the execution. After this period the coordinator will make its best effort to stop the query. Note that some operations in planning phase are not easily cancellable and may not terminate immediately.
query.max-run-timeprop-type-duration100dquery_max_run_timeThe maximum allowed time for a query to be processed on the cluster, before it is terminated. The time includes time for analysis and planning, but also time spent in a queue waiting, so essentially this is the time allowed for a query to exist since creation.
query.max-scan-physical-bytesprop-type-data-sizequery_max_scan_physical_bytesThe maximum number of bytes that can be scanned by a query during its execution. When this limit is reached, query processing is terminated to prevent excessive resource usage.
query.max-write-physical-sizeprop-type-data-sizequery_max_write_physical_sizeThe maximum physical size of data that can be written by a query during its execution. When this limit is reached, query processing is terminated to prevent excessive resource usage.
query.max-stage-countprop-type-integer1501The maximum number of stages allowed to be generated per query. If a query
generates more stages than this it will get killed with error
QUERY_HAS_TOO_MANY_STAGES.
:::{warning}
Setting this to a high value can cause queries with a large number of
stages to introduce instability in the cluster causing unrelated queries
to get killed with REMOTE_TASK_ERROR and the message
Max requests queued per destination exceeded for HttpDestination ...
:::
query.max-historyprop-type-integer100The maximum number of queries to keep in the query history to provide statistics and other information, and make the data available in the . If this amount is reached, queries are removed based on age.
To store query events and therefore information about more queries in an external system you must use an event listener.
query.min-expire-ageprop-type-duration15mThe minimal age of a query in the history before it is expired. An expired query is removed from the query history buffer and no longer available in the .
To store query events and therefore information about more queries in an external system you must use an event listener.
query.remote-task.enable-adaptive-request-sizeprop-type-booleantrueremote_task_adaptive_update_request_size_enabledEnables dynamically splitting up server requests sent by tasks, which can prevent out-of-memory errors for large schemas. The default settings are optimized for typical usage and should only be modified by advanced users working with extremely large tables.
query.remote-task.guaranteed-splits-per-taskprop-type-integer3remote_task_guaranteed_splits_per_requestThe minimum number of splits that should be assigned to each remote task to
ensure that each task has a minimum amount of work to perform. Requires
query.remote-task.enable-adaptive-request-size to be enabled.
query.remote-task.max-error-durationprop-type-duration1mTimeout value for remote tasks that fail to communicate with the coordinator. If the coordinator is unable to receive updates from a remote task before this value is reached, the coordinator treats the task as failed.
query.remote-task.max-request-sizeprop-type-data-size8MBremote_task_max_request_sizeThe maximum size of a single request made by a remote task. Requires
query.remote-task.enable-adaptive-request-size to be enabled.
query.remote-task.request-size-headroomprop-type-data-size2MBremote_task_request_size_headroomDetermines the amount of headroom that should be allocated beyond the size of
the request data. Requires query.remote-task.enable-adaptive-request-size to
be enabled.
query.info-url-templateprop-type-string(URL of the query info page on the coordinator)Configure redirection of clients to an alternative location for query
information. The URL must contain a query id placeholder ${QUERY_ID}.
For example https://example.com/query/${QUERY_ID}.
The ${QUERY_ID} gets replaced with the actual query's id.
retry-policyprop-type-stringNONEThe {ref}retry policy <fte-retry-policy> to use for
{doc}/admin/fault-tolerant-execution. Supports the following values:
NONE - Disable fault-tolerant execution.TASK - Retry individual tasks within a query in the event of failure.
Requires configuration of an {ref}exchange manager <fte-exchange-manager>.QUERY - Retry the whole query in the event of failure.