SQL Diagnosis

Prerequisites

To enable SQL diagnosis, enable monitoring on real-time and historical queries on the Queries and History tabs, respectively. For details, see Monitoring Collection.

Viewing SQL Diagnosis

  1. Log in to the GaussDB(DWS) console.
  2. Choose Dedicated Clusters > Clusters and locate the cluster to be monitored.
  3. In the Operation column of the target cluster, click Monitoring Panel.
  4. In the navigation pane on the left, choose Utilities > SQL Diagnosis. The metrics include:

    • Query ID
    • Database
    • Schema Name
    • User Name
    • Client
    • Client IP Address
    • Running Time (ms)
    • CPU Time (ms)
    • Scale-Out Started
    • Completed
    • Details

  5. On the SQL Diagnosis page, you can view the SQL diagnosis information. In the Details column of a specified query ID, click View to view the detailed SQL diagnosis result, including:

    • Alarm Information
    • SQL Statement
    • Execution Plan

Setting GUC Parameters

GUC parameters related to SQL diagnosis are as follows. For details, see "GUC Parameters" in the Data Warehouse Service (DWS) Developer Guide.