ODBC Server Installation and Management Manual

Managing NonStop ODBC Server Resources
HP NonStop ODBC Server Installation and Management Manual429395-002
5-12
Resource Governing Facility
Resource Governing Facility
Setting the priority of SQL statements to influence resource use can provide some
benefit to a multiuser environment. Methods of balancing and controlling the use of
system resources vary from system to system. As a system administrator, you should
experiment with this facility and adjust resources accordingly to best meet your system
needs. You can always reconfigure the priority settings in the NonStop ODBC Server
catalog by using utility statements.
The data provided by the resource accounting facility could be used in conjunction with
the resource governing facility to help define resource governing. Accounting data
provides information about resources used over time.
The resource governing facility applies only to SQL statements generated directly by
the user, not to SQL statements generated internally by the NonStop ODBC Server
product. Queries to look up and map the NonStop ODBC Server object name to the
SQL/MP object name, for example, are not covered.
Architecture of the Resource Governing Facility
The NonStop ODBC Server resource governing facility consists of the following
components:
The capability to allow the system administrator to set up a query scheduling policy
and a run-time governing policy by defining the limits and the trigger actions.
The capability to use the scheduling policy to determine how to run a query after a
statement has been compiled but before the statement is executed.
The capability to use the run-time governing policy to govern the query execution
and to take action when a query exceeds its limit.
The capability to record currently active user queries in a query status table.
The limits are defined, through governing policies that are then referenced from a user
profile. The NonStop ODBC Server retrieves the governing policies at user logon time
and uses the predefined policies to limit each SQL statement execution.
All scheduling and governing actions are enforced by the NonStop ODBC Server. A
NonStop ODBC Server process can enforce governing only when it has control of the
process. When SQL/MP is processing a query, control may not be returned for an
extended period of time; during this time, no governing can take place. In this case,
using the query status table is the best way to monitor those queries and then
manually intervene as needed, such as stopping a NonStop ODBC Server process.
A status record is written to a NonStop ODBC Server query status table at the time a
query starts. There is one record for each user SQL statement being executed. When
the query is finished, this record is deleted from the table. If you do not require
resource managing, you can configure the NonStop ODBC Server to not record any
status in the status table. You should probably generate the status record only for large
queries with an estimated cost greater than n (some maximum amount determined by