Appearance
RESTART query
Restart a query in a resource pool with specified resources.
RESTART query TO WLM RESOURCE POOL name [ WITH ( resource=value [,...] ) ]
where query
refers to the ID of a running query and resource
is one of the following:
priority
memory
spool
spill
Queries are restartable when they are in the assemble
, compile
, acquire resources
, and run
states. See How Queries Are Executed.
Examples
For example, restart a query in the large
pool:
premdb=# restart 344321 to wlm resource pool large;
RESTART
Restart a query in the large
pool with specific requests for priority, memory, and spill space:
premdb=# restart 347010 to wlm resource pool large
with ( priority high, memory '500MB', memory '40%', spill '10%' );
RESTART
To get a list of currently running queries, select from the sys.query view. For example:
premdb=# select query_id from sys.query where type='insert';
query_id
----------
2465924
(1 row)
premdb=# restart 2465924 to wlm resource pool long;
RESTART
Parent topic:SQL Commands