Skip to content

Request limits ​

Request limits bound one SQL request, including its statements. Configure a server ceiling in XML or save a tighter value for the selected database with SET.

Limits ​

Setting Unit
max_execution_time Seconds.
max_memory_usage Bytes of accounted query memory.
max_result_rows Returned rows accumulated across the request.
max_response_bytes Encoded successful response bytes, including logical protocol fields.

All default to zero, meaning no added ceiling at that level. The stricter nonzero server and database values apply.

Results and errors ​

Returned rows include the result-bearing statements covered by the request contract. Response-byte limits count encoded output and protocol fields, rather than only cell values. The protocol independently caps a response at 16 MiB.

Exceeding a limit returns a database error. Transaction recovery commands remain available so the client can finish or roll back its transaction.

Use system.settings to inspect effective values and system.query_log for completed request metrics. See the database settings reference for each setting's exact accounting scope.