Procedure | Description | Example |
---|---|---|
sys.current_sessionid() | get the id of the current session. | select sys.current_sessionid(); |
sys.setclientinfo(property string, value string) | set client value for client info property of current session. Valid property values are: ClientHostname, ApplicationName, ClientLibrary, ClientPid and ClientRemark (see also table: sys.clientinfo_properties). The client info property values will be shown when querying view sys.sessions | call sys.setclientinfo('ClientRemark', 'Test42'); |
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 session | call sys.setoptimizer('minimal_pipe'); |
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); |
To get your current session id value run query: SELECT sys.current_sessionid();
To list allowed client info property names in your MonetDB server run query: SELECT * FROM sys.clientinfo_properties;
To list all sessions info in your MonetDB server run query: SELECT * FROM sys.sessions;
. Note that this works only if you have monetdb role or an explicit select privilege.
Procedure | Description | Example |
---|---|---|
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 session | call 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); |
sys.stopsession(sessionid int) | stops the specified session. Use with caution. | call sys.stopsession(4); |
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); |