ODBC Server Installation and Management Manual

Managing NonStop ODBC Server Resources
HP NonStop ODBC Server Installation and Management Manual429395-002
5-15
Scheduling A Query
The following example illustrates how resource policies are set. User SQL_ODBC uses
COREPROF as a user profile; user profile COREPROF has been configured to use
Policy-A as the scheduling policy (by means of estimated cost) and governing policy.
User profile:
PROFILE_NAME GOV_MODE_ON GOV_NAME QST_LOG_ON
coreprof Y Policy-A N
(do not log all statements)
Governing policy:
GOV_NAME GOV_ATTRIBUTE LIMIT_VALUE GOV_ACTION QST_LOG_ON
Policy-A estimated_cost 500 priority --10 N
Policy-A estimated_cost 3000 priority --30 Y
Policy-A estimated cost 5000 stop N
Policy-A elapsed time 10 min. commit
Policy-A rows accessed 10000 priority --30
Scheduling A Query
There are two ways to schedule a query:
A query can be launched with a different priority.
A query can be prevented from running if its estimated cost exceeds the
predefined cost threshold.
These approaches for scheduling queries are defined by using the estimated cost
attribute.
GOV_ACTION Action to be taken when the limit value is exceeded, or one of
the following:
PRIORITY + + n Increase the priority by n.
PRIORITYn Lower the priority by n.
PRIORITY n Set the priority to n.
COMMIT Stop and commit the transaction.
ROLLBACK Stop and roll back the transaction.
CONTINUE Continue without any changes.
STOP Do not execute the statement; this action
can be used only with estimated cost.
QST_LOG_ON Specifies whether to log the statement. Used only with
estimated cost attributes. This entry allows you to log query
status for only those queries with a given cost range.
If QST_LOG_ON is set in the user profile (ZNSPROF),
causing every statement to be logged, QST_LOG_ON in the
user profile overrides the QST_LOG_ON attribute in the
governing policy.
LAST_UPDATED Timestamp when this table was last updated.