Session Procedures

ProcedureDescriptionExample
sys.setmemorylimit(limit int)set query execution memory limit in MB for current session. 0 will disable any query memory limit.call sys.setmemorylimit(500);
sys.setoptimizer(optimizer string)change optimizer pipeline for current sessioncall sys.setoptimizer('minimal_pipe');
sys.setprinttimeout(timeout int)Print long running queries every so many minutes to log file for current session. 0 will disable print timeout.call sys.setprinttimeout(6);
sys.setquerytimeout(timeout int)set query execution timeout in seconds for current session. 0 will disable timing out.call sys.setquerytimeout(8);
sys.setsessiontimeout(timeout int)set session timeout in seconds for current session. 0 will disable timing out.call sys.setsessiontimeout(30);
sys.setworkerlimit(limit int)set number of worker threads limit for current session. 0 will disable any limit of worker threads.call sys.setworkerlimit(16);
sys.setsession(timeout bigint)set session timeout in seconds for current session. Warning: This procedure is Deprecated as of Jun2020 (11.37.7). Use sys.setsessiontimeout(timeout) instead.call sys.setsession(30);
sys.settimeout(querytimeout bigint)set query timeout in seconds for current session. Warning: This procedure is Deprecated as of Jun2020 (11.37.7). Use sys.setquerytimeout(timeout) instead.call sys.settimeout(8);
sys.settimeout(querytimeout bigint, sessiontimeout bigint)set query and session timeout in seconds for current session. Warning: This procedure is Deprecated as of Jun2020 (11.37.7). Use sys.setquerytimeout(timeout) and sys.setsessiontimeout(timeout) instead.call sys.settimeout(8, 30);

Session procedures for monetdb admin user only

To list all sessions info in your MonetDB server first run query: SELECT * FROM sys.sessions;

ProcedureDescriptionExample
sys.setmemorylimit(sessionid int, limit int)set query execution memory limit in MB for specified session. 0 will disable any memory limit.call sys.setmemorylimit(4, 500);
sys.setoptimizer(sessionid int, optimizer string)change optimizer pipeline for specified sessioncall sys.setoptimizer(4, 'sequential_pipe');
sys.setquerytimeout(sessionid int, timeout int)set query execution timeout in seconds for specified session. 0 will disable timing out.call sys.setquerytimeout(4, 8);
sys.setsessiontimeout(sessionid int, timeout int)set session timeout in seconds for specified session. 0 will disable timing out.call sys.setsessiontimeout(4, 30);
sys.setworkerlimit(sessionid int, limit int)set number of worker threads limit for specified session. 0 will disable any limit of worker threads.call sys.setworkerlimit(4, 16);