# Adjust TiDB Server Parameters (A)

+ The maximum memory used by single SQL statement & the SQL statement behavior after it’s exceeding maximum memory
  + `mem-quota-query` 
  + `oom-action` 

-------------------------------------------------------------
TiDB cluster provides several parameters related to memory usage to limit the maximum memory that can be used by a single SQL, and whether to enable temporary disks when the specified maximum memory resources are exceeded.
Try to reduce the impact on TiDB Server caused by the excessive memory usage of a single SQL.

- The maximum memory occupied by a single SQL & the behavior of SQL after the maximum memory is exceeded
   - mem-quota-query
     - The maximum memory threshold that a single SQL statement can occupy, in bytes, the default value is 1073741824
     - Requests exceeding this value will be handled by the behavior defined by oom-action, and this value is used as the initial value of the system variable tidb_mem_quota_query
   -oom-action
     - Behavior when the memory usage of a single SQL in TiDB exceeds the mem-quota-query limit and the temporary disk can no longer be used
     - Default: "cancel". When set to "log", only logs are output. When set to "cancel", the SQL operation is canceled and the log is output.

