Amazon Redshift
Database Developer Guide
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.


Values (Default in Bold)

0 (turns off limitation), x milliseconds


Aborts any statement that takes over the specified number of milliseconds.

The statement_timeout value is the maximum amount of time a query can run before Amazon Redshift terminates it. This time includes planning, queueing in WLM, and execution time. Compare this time to WLM timeout (max_execution_time) and a QMR (query_execution_time), which include only execution time.

If WLM timeout (max_execution_time) is also specified as part of a WLM configuration, the lower of statement_timeout and max_execution_time is used. For more information, see WLM Timeout.


Because the following query takes longer than 1 millisecond, it times out and is cancelled.

set statement_timeout to 1; select * from listing where listid>5000; ERROR: Query (150) cancelled on user's request