Was this helpful?
ALTER WLM Examples
1. Make the “night” configuration active:
ALTER WLM_CONFIG SET CONFIG=night
2. Make a new “reports” queue in the “daytime” configuration with medium priority, a maximum limit of 100 queries running at a time, and only allow SELECT queries to run in this queue. The ratio number for this queue is 10.
ALTER WLM ADD QUEUE REPORTS WITH PRIORITY=MED, ACTIVE_LIMIT=100, CONFIG=daytime, READWRITE=R, RATIO=10
3. Force the session with session ID 0x7f4188abd700 to stop waiting and start executing:
ALTER WLM SET SESSION ‘0x7f4188abd700’ ACTIVE
4. Force all queries (including the current query) for session ‘0x7f4188abd700’ to start running in the ‘escalations’ queue and use a low priority when being placed on the wait list:
ALTER WLM SET SESSION ‘0x7f4188abd700’ QUEUE=escalations, PRIORITY=LOW
5. Move the current query for session ‘0x7f4188abd700’ into the ‘escalations’ queue. If the query must wait in that queue, wait using a low priority. When the query has finished running, revert to the normal (configured) queues for this session:
ALTER WLM SET SESSION ‘0x7f4188abd700’ QUEUE=escalations, PRIORITY=LOW FOR CURRENT QUERY
6. Make the “ingres” user a superuser:
ALTER WLM QUEUE $superuser ADD USER ingres WITH PRIORITY=LOW
7. Authorize the group “users1” to use the queue “reports” using a wait list priority of medium:
ALTER WLM QUEUE reports ADD GROUP users1 WITH PRIORITY=MED
Last modified date: 06/28/2024