Neoview Workload Management Services Guide (R2.3)

For the syntax, see the “RELEASE Command” (page 66).
Managing Queries
You can manage queries in WMS by using the HOLD, RELEASE, and CANCEL commands. The
HOLD command enables you to hold a query that is in the waiting queue, and the RELEASE
command enables you to release a holding query and put it back into the waiting queue. You
can also kill a waiting or executing query to free system resources by using the CANCEL
command. For more information, see:
“Holding a Query” (page 52)
“Releasing a Query” (page 52)
“Cancelling a Query” (page 52)
Queries in WMS are either waiting to execute or executing. A client application that issues a
query has no way of knowing whether the query is in the waiting queue. The client application
perceives the time spent by the query in the waiting queue as part of the execution time. To
determine whether a particular query is in the waiting queue, use the STATUS QUERY <query-id>
command. For more information, see “Filtering the Status and Compile-Time Statistics of Queries”
(page 44) or the “STATUS Command” (page 66).
Holding a Query
Use the HOLD command to hold a query in the waiting queue. The HOLD command takes the
query out of the waiting queue, thus allowing other queries in the waiting queue to proceed to
the executing state when system resources become available. You can put the query back into
the waiting queue by issuing a RELEASE command. For more information, see “Releasing a
Query” (page 52).
NOTE: To hold a query, the query must be in the waiting queue. You cannot hold an executing
query. To cancel an executing query, see “Cancelling a Query” (page 52).
For example, this HOLD command holds a specific waiting query:
NS%hold query MXID01001120500212040077432400244000000000205susan00_37_STMT1
+>;
--- WMS operation complete.
NS%
For the syntax, see the “HOLD Command” (page 63).
Releasing a Query
Use the RELEASE QUERY command to release a query that is being held in WMS and put it
back into the waiting queue. For example, this RELEASE command releases a holding query:
NS%release query MXID01001120500212040077432400244000000000205susan00_37_STMT1
+>;
--- WMS operation complete.
NS%
For the syntax, see the “RELEASE Command” (page 66).
Cancelling a Query
Use the CANCEL QUERY command to cancel an executing or waiting query in WMS and free
system resources. For example, this CANCEL command kills a specific executing query:
NS%cancel query MXID01001120500212040077432400244000000000205susan00_37_STMT1
+>;
52 Managing Workload in WMS