Collecting performance data for SQL statements

Use the Performance metrics tab of the SQL editor view to run SQL statements against a database and collect data about the performance of the statements.

Before you begin

About this task

The workbench can connect to your performance management repository database in order to collect data about the performance of your SQL queries against a monitored database. Use the Performance metrics tab of the SQL editor view to connect to a repository database. Then, you can use the Performance Metrics view to view, compare, and sort the data about the performance of your queries.

Procedure

To collect performance data for SQL statements:

  1. Enter an SQL statement or open a .sql file in the SQL editor.
  2. Select a connection profile for the monitored database in the Connection tab of the SQL editor. If no profile was selected when you opened the SQL editor, click the No connection link, then select the connection to the monitored database.
  3. Specify the information about the performance repository database in the Performance metrics tab. You can use an existing profile, or manage and create profiles to connect to monitored databases.
    Note: The profile information that you specify in this tab must include a database that is monitored by the performance management repository database. The monitored database must match the connection that you specified in the Connection tab of the SQL editor.
  4. Click the Run and collect performance metrics button to run the SQL script against the monitored database. The queries run against the database, and the performance metrics are collected in the performance repository database and displayed in the Performance Metrics view.
    Note: This action may take up to six minutes to complete.
  5. Use the Performance Metrics view to evaluate the performance of your SQL statements. You can right-click one or more selected SQL statements to open them in the SQL editor view or remove them from the Performance Metrics view.

Feedback