Appendix: Query Administration

This appendix provides an overview of Query Administration and discusses how to use Query Administration.

Click to jump to parent topicUnderstanding Query Administration

System administrators can use Query Administration to monitor query performance and usage. Some of the conditions that you can monitor include average runtime, number of times run, and the dates last run. Using a predefined search, you can also select queries to review and report on.

Note. Workflow queries are excluded from the statistics because of the large volume that can be run as part of workflow processing. Therefore, you should take care that workflow queries are as efficient as possible.

Query Administration also enables you to cancel queries that are currently running in Query Manager and Query Viewer as well as enable and disable queries and logging.

Note. You cannot cancel currently running scheduled queries.

See Also

Using Query Profiles

Click to jump to parent topicUsing Query Administration

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicPages Used for Query Administration

Page Name

Definition Name

Navigation

Usage

Admin (Administration)

QRY_ADMIN

PeopleTools, Utilities, Administration, Query Administration

Administer queries.

Executing

QRY_KILL

PeopleTools, Utilities, Administration, Query Administration, Executing

Cancel currently running queries, and enable or disable queries and logging.

Settings

QRY_SETTINGS

PeopleTools, Utilities, Administration, Query Administration, Settings

Set additional options such as enabling the query time-out feature and running query statistics.

Click to jump to top of pageClick to jump to parent topicAdministering Queries

Access the Admin page (PeopleTools, Utilities, Administration, Query Administration).

To administer queries:

  1. Use either the predefined search or manual search option to restrict the list of queries that are displayed.

    For a predefined search, enter the desired value for the selected search option in the (n)= field and select one of the following options:

  2. Click the Search button to display a list of queries that match your search criteria.

    The Query List group box lists those queries that match your search criteria.

  3. Review the following statistics for each query that is listed:

  4. For the appropriate query, click the View Log link to view the log for that query.

    A message appears if no logs are available.

  5. For the appropriate query, click the View SQL link to view the SQL for that query.

  6. Select the check box for each query on which you want to perform an action.

    You can also click the Check All button to select all queries, or click the Uncheck All button to clear all queries.

  7. Perform an action by clicking one of the following buttons:

  8. For the appropriate query, click the Logging button to enable logging for that query.

Note. Your changes are saved automatically. No Save button is available.

Click to jump to top of pageClick to jump to parent topicManaging Currently Running Queries

Access the Executing page (PeopleTools, Utilities, Administration, Query Administration, Executing).

The Executing page displays all of the currently running queries, allowing you to enable or disable queries, enable or disable logging, and cancel currently running queries. If an administrator needs to verify that a query has been canceled, he or she can look in the Appsrv.log and verify that the PSMONITORSRV service has canceled the selected query.

To manage currently running queries:

  1. Use either the predefined search or manual search option to restrict the list of queries that are displayed.

    For a predefined search, select one of the following options:

  2. In the (n)= field, enter the value that you want for the search option.

    For a manual search, select to search queries by query name or owner ID.

    You can define your search further by selecting either the begins with or contains search type.

  3. Click the Search button to display a list of queries that match your search criteria.

    The Query List group box lists those queries that match your search criteria.

  4. Review the following statistics for each query that is listed:

  5. For the appropriate query, click the View Log link to view the log for that query.

    A message appears if no logs are available.

  6. For the appropriate query, click the View SQL link to view the SQL for that query.

  7. Select the check box for each query on which you want to perform an action.

    You can also click the Check All button to select all queries, or click the Uncheck All button to clear all queries.

  8. Perform an action by clicking one of the following buttons:

  9. For the appropriate query, select the Logging check box to enable logging for that query.

Note. Your changes are saved automatically. No Save button is available.

The kill (cancel) query/time-out mechanism represents each query that is run from Query Manager or Query Viewer as a row in the table PSQRYTRANS. Query Monitor, which implements the kill query/time-out functionality, has a mechanism that looks for orphan rows in PSQRYTRANS. Orphan rows are rows in PSQRYTRANS that do not have a query actively running. Orphan rows can be created because the server crashed while running a query, or other reasons.

Query Monitor looks for orphan rows only for the application server domain that it is running in. For this reason, orphan rows could be in PSQRYTRANS when no active domain exists. These rows are not seen by the online query monitoring facility, but could potentially exist in the database. Such rows are rare, and you can use the database query tool to clean them up. You can use the machine and domain fields to determine whether rows exist that should be cleaned up.

Click to jump to top of pageClick to jump to parent topicSetting Additional Options

Access the Settings page (PeopleTools, Utilities, Administration, Query Administration, Settings).

Enable Query Timeout

Select or clear this check box to enable or disable the query time-out feature on a system-wide basis. The time-out values are stored in each permission list.

Note. The query time-out feature applies to queries that are run in Query Manager and Query Viewer. This feature does not apply to scheduled queries.

Run Query Statistics

Select or clear this check box to enable or disable the query statistics feature on a system-wide basis.

By default, the query statistics feature is disabled.

PeopleSoft recommends that you use the query statistics feature only for analysis, and that you do not leave it enabled on an ongoing basis. Enabling this feature may compromise the performance and the system may have an increased possibility of query time-outs or may return query results with zero values. This recommendation also applies to users of queries in reports.