How do I change the limit in execution time for queries above 30'' ?
If I try
SET MAX_EXECUTION_TIME = 3600
I receive
error 1193 "unknown system variable MAX_EXECUTION_TIME"
I'm using MySQLWorkbench and mysql version 5.6.36
If you are running MySQL 5.7.8 or later, you can use
SET SESSION MAX_EXECUTION_TIME = 3600
to set it for the session, or
SET GLOBAL MAX_EXECUTION_TIME = 3600
to set it globally. Note that this ability was first introduced in MySQL 5.7.4 as max_statement_time; in 5.7.8 the name was changed to max_execution_time.
If you have MySQL 5.7 or later, this parameter MAX_EXECUTION_TIME is for long running queries.
At first check the current value by running this query
> SELECT @@GLOBAL.MAX_EXECUTION_TIME @@SESSION.MAX_EXECUTION_TIME;
Then set it according to your needs.
> SET SESSION MAX_EXECUTION_TIME=3600;
> SET GLOBAL MAX_EXECUTION_TIME=3600;
You can try setting it at query level, like
SELECT +MAX_EXECUTION_TIME(3600) * FROM T
MAX_EXECUTION_TIME(N) applied to read only select statements.