57.2. Viewing Active Session History #

  1. Go to the active session history in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringActive sessions history.

      2. From the drop-down list in the top-right corner of the page, select an instance.

    • Using the corresponding section of an instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to Active sessions history.

    The total wait event time line graph and tables with queries and sessions will be displayed. The displayed data is limited to a single instance and a specified time period.

    By default, the first instance from the instance drop-down list and the time period of the last 4 hours are selected.

    Note

    When navigating to the active session history page from an instance page, the instance drop-down list is not displayed.

  2. Under the certain conditions, the graph and/or tables may be absent or contain no data. If so, depending on messages displayed, try the following actions:

    • Profiling is disabled.

      Either enable profiling for the selected instance, or select another instance with enabled profiling from the top-right corner of the page.

    • No data.

      Profiling is enabled, but no data can be fetched.

      Ensure that the manager and agents are running and operational, and there are no network-related issues. Try to access the active history page later.

    • No active sessions and wait events.

      Either profiling is paused, or no sessions and events happened within the selected time period. Try the following actions:

      • Resume profiling if it is paused.

      • Wait for the historical data to be collected.

      • In the top-right corner of the line graph, specify a different time period or select it from the drop-down list.

  3. (Optional) Use the controls on the page to adjust the data displayed:

    • Configure auto-refreshing of the displayed data:

      • In the top-right corner of the page, click to enable auto-refreshing.

      • In the top-right corner of the page, click to disable auto-refreshing.

      If auto-refreshing is disabled, refresh the data manually by clicking .

    • In the top-right corner of the page, select a different instance from the instance drop-down list.

    • Select or specify a different time period by performing one of the following actions:

      • In the top-right corner of the line graph, specify a different time period or select it from the drop-down list.

      • In the top-right corner of the line graph, click . Then, inside the graph, press the left mouse button and drag the cursor to select a horizontal area that represents a time period of interest.

      The graph is scaled in accordance with the selected time interval.

57.2.1. Viewing Total Wait Event Time #

The line graph contains data related to the total wait event time.

To view summary of wait event statistics at a specific point of time, hover over the graph to this point.

In the bottom of the graph, click the legend checkboxes to show or hide certain event types.

Switch between the graph display modes to view different data representations:

  • When the total wait time per event types is displayed, the graph is in the main mode (it is the default mode).

    To switch to the alternative mode, click on the colored part of the graph.

  • When the total wait time per events is displayed, the graph is in the alternative mode.

    A different event type can be selected from the drop-down list in the top of the graph.

    To switch back to the main mode, click Back.

In the top-right corner of the graph, click to download the data collected within the time period displayed in the drop-down list in the CSV format. The data is downloaded in a raw non-aggregated form to be used as a source in external systems. The name of the file is the profile identifier.

If no data is collected within the time, the resulting file contains only the header.

All data collected within the time period are saved to the file, even if the graph is configured in a way that no data is displayed on it, for example by deselecting all the legend checkboxes.

57.2.2. Viewing SQL Queries and Sessions #

The tables below the line graph contain data related to queries and sessions.

If the tables contain a large number of rows, the pagination controls are displayed at the bottom of tables. Click the page number to switch to the page.

Note

Duration and execution time values that are less than one second are displayed in milliseconds.

The SQL queries table has the following columns:

  • Activity: The colored horizontal indicator that represents the query wait time compared to the other queries within the selected time period.

    To view details about the activity, hover over the indicator.

  • Query ID.

    To filter queries, click and enter a full or partial query text.

    To view SQL statistics for the query, click the query ID. You will be redirected to the SQL statistics page of the related instance.

  • Query, Duration.

    To view the query details, click the query (for example, SELECT). The window with detailed information about the query will open. The following parameters are displayed:

    • Number of executions and Total execution time.

      These parameters are displayed only if the pg_stat_statements module is installed on the instance.

    • Query: The query text.

      If the query is a result of executing a prepared statement, the Prepared statement badge is displayed. In this case, the query text is the prepared statement text.

      To view the name of the prepared statement, hover over the badge.

      To copy the query text, click .

    • Query plan: The query plan, if available.

      The query plan is displayed only if the pgpro_stats extension is installed on the instance.

      Even with the extension installed, the query plan may be unavailable.

      To copy the query plan, click .

  • Number of executions, Total execution time.

The Sessions table has the following columns:

  • Activity: The colored horizontal indicator that represents the session duration compared to other sessions within the selected time period.

    To view details about the activity, hover over the indicator.

  • Process ID: The backend ID.

  • User: The name of the DBMS user on behalf of which the session is initiated.

  • Database: The name of the database associated with the user session.

  • Application: The name of the source application of the user session.