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 .

Viewing SQL Diagnosis

  1. Log in to the GaussDB(DWS) management console.
  2. On the Clusters page, locate the target cluster.
  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:

    • Diagnosis Type
    • 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.