Table Diagnosis
GaussDB(DWS) provides statistics and diagnostic tools for you to learn table status, including:
- Skew Rate: monitors and analyzes data table statistics in the cluster, and displays information about the 50 largest tables whose skew rate is higher than 5%.
- Dirty Page Rate: monitors and analyzes data table statistics in the cluster, and displays information about the 50 largest tables whose skew rate is higher than 50%.
- DDL Audit: DDL review is a type of SQL review. To prevent improper DDL design from affecting services, this tool checks whether DDL metadata is standard, detecting potential table definition problems in advance. The check result can also be used as a reference for locating performance issues.
- Only 8.1.1.x and later versions support the table skew rate and dirty page rate features. For earlier versions, contact technical support.
- Only 8.1.1.300 and later versions support the DDL review feature. For earlier versions, contact technical support.
- The collection period of the table skew rate and dirty page rate can be configured on the Monitoring Collection page of the cluster. Frequent collection may affect cluster performance. Set a proper period based on your cluster workloads.
Skew Rate
Context
Improper distribution columns can cause severe skew during operator computing or data spill to disk. The workloads will be unevenly distributed on DNs, resulting in high disk usage on a single DN and affecting performance. You can query your table size and skew rate, and change the distribution columns of tables with severe skew. In cluster versions 8.1.0 and later, you can use the syntax ALTER TABLE. In other cluster versions, perform the operations described in How Do I Change Distribution Columns?.
Procedure
- Log in to the GaussDB(DWS) console.
- On the Clusters > Dedicated Clusters page, locate the cluster to be monitored.
- In the Operation column of the target cluster, click Monitoring Panel.
- In the navigation tree on the left, choose Utilities > Table Diagnosis and click the Skew Rate tab. The tables that meet the statistics collection conditions in the cluster are displayed.
Dirty Page Rate
Context
DML operations on tables may generate dirty data, which unnecessarily occupies cluster storage. You can query the dirty page rate of tables, and optimize large tables and tables with high dirty page rate. For details, see Solution to High Disk Usage and Cluster Read-Only.
Procedure
- Log in to the GaussDB(DWS) console.
- On the Clusters > Dedicated Clusters page, locate the cluster to be monitored.
- In the Operation column of the target cluster, click Monitoring Panel.
- In the navigation tree on the left, choose Utilities > Table Diagnosis and click the Dirty Page Rate tab. The tables that meet the statistics collection conditions in the cluster are displayed.
DDL Audit
Viewing and Exporting DDL Audit Results
- Log in to the GaussDB(DWS) console.
- On the Clusters > Dedicated Clusters page, locate the cluster to be monitored.
- In the Operation column of the target cluster, click Monitoring Panel.
- In the navigation tree on the left, choose Utilities > Table Diagnosis, and click the DDL Audit tab. The audit results are displayed.
The selected audit items are displayed on the DDL Audit tab by default. You can configure the audit items on the Monitoring Collection tab. For more information, see Table 1.
- If the review result of an item is Failed, click View to go to the details page.
- Click Export in the upper left corner to export the audit result.
Manually Auditing DDL Items
- Log in to the GaussDB(DWS) console.
- On the Clusters > Dedicated Clusters page, locate the cluster to be monitored.
- In the Operation column of the target cluster, choose Monitoring Panel. The database monitoring page is displayed.
- In the navigation tree on the left, choose Utilities > Table Diagnosis, and click the DDL Audit tab. On the page that is displayed, select the items to be audited and click One-Click Audit.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.