Partition heatmap
The heatmap helps you visualize access patterns and data distribution across partitions to quickly identify hotspots.
Usage notes
-
The heatmap displays data distribution only for databases in AUTO mode within the current instance.
-
If a single logical database contains more than 8,000 partitions, the system does not collect heatmap data for that database. You can adjust this limit by modifying the kernel parameter PARTITIONS_HEATMAP_COLLECTION_MAX_SINGLE_LOGIC_SCHEMA_COUNT.
-
If a single collection task scans more than 8,000 partitions, the system stops collecting heatmap data for any additional partitions. You can adjust this limit by modifying the kernel parameter PARTITIONS_HEATMAP_COLLECTION_MAX_SCAN.
-
To enable heatmap data collection for the first time, you must use a privileged account. For more information, see Enable heatmap data collection and Manage database accounts.
Procedure
Log on to the DAS console.
In the navigation pane on the left, click .
Find the target instance and click the instance ID to open the instance details page.
-
In the left-side navigation pane, click Heatmap. On this page, you can view the distribution and access statistics of partition data.
Click the Data Node View button at the top to switch to the data node perspective. This view shows partition hotspot information organized by data node, helping you analyze data balance across physical data nodes and identify any that are overloaded.
Figure 1. Database and Table View
Figure 2. Data Node View
-
Left-side histogram: Each rectangle represents an item such as a logical database, logical table, or logical partition. In the Data Node View, the rectangles represent data nodes, logical databases, logical tables, and logical partitions. For rectangles that represent data nodes and logical partitions, a longer rectangle indicates a larger data volume.
-
Bottom histogram: Displays the aggregated access volume for all partitions at a specific point in time, which is the vertical sum of the heatmap.
-
Right-side histogram: Displays the aggregated access volume for a specific partition across the entire time range, which is the horizontal sum of the heatmap.
-
Heatmap: The brightness of the colors in the central area indicates the access volume. Brighter colors represent higher access volumes. Bright yellow indicates the highest volume, and black indicates the lowest.
Note-
If no data is collected, the heatmap displays NO DATA.
-
If the number of partitions to display exceeds 3,200, the heatmap displays TOO BIG.
-
If the total number of raw partitions collected exceeds 1,600, the system merges their statistics for display. This merge operation does not affect the original partitions. Statistics are merged only for partitions that belong to the same logical table on the same data node. Partitions with smaller data volumes are merged more aggressively. If the total number of partitions after merging still exceeds 3,200, the heatmap also displays TOO BIG.
-
-
-
When you hover your cursor over a point on the heatmap, a tooltip appears with detailed metrics. The parameters are described as follows:
-
The colored box at the top: The color of the box is consistent with the area that you hover over. The data in the box indicates the access rate for the partition during the corresponding time period, measured in rows/min (rows per minute).
-
Started At: The start time of the data collection sample.
-
Ended At: The end time of the data collection sample.
-
Current Number of Rows: The number of rows currently stored in the partition.
NoteCurrentrefers to the time when you loaded the heatmap, not the time period specified by Start Time and End Time. -
Data Node: The data node where the partition is located.
NoteIf this field displays a hyphen (-), the partition no longer exists. This can be caused by DDL changes or by the statistics merge process.
-
Database: The name of the logical database to which the partition belongs.
-
Table: The name of the logical table to which the partition belongs.
-
Partition: The name of the logical partition.
-
Custom operations
Enable heatmap data collection
SET ENABLE_SET_GLOBAL = true;
SET GLOBAL ENABLE_PARTITIONS_HEATMAP_COLLECTION = true;
Disable heatmap data collection
SET ENABLE_SET_GLOBAL = true;
SET GLOBAL ENABLE_PARTITIONS_HEATMAP_COLLECTION = false;
Data that has already been collected remains visible. After you disable this feature, the system stops collecting new data.
Collect for specific databases and tables
SET ENABLE_SET_GLOBAL = true;
SET GLOBAL PARTITIONS_HEATMAP_COLLECTION_ONLY = '{database1}#{table1}&{table2},{database12}#{table1}&{table2}';
Examples
-
To collect heatmap data for the
customerandorderlogical tables in thetpcclogical database, and for thenationlogical table in thetpchlogical database:SET ENABLE_SET_GLOBAL = true; SET GLOBAL PARTITIONS_HEATMAP_COLLECTION_ONLY = 'tpcc#customer&order,tpch#nation'; -
To collect heatmap data for all logical tables in the
tpccandtpchlogical databases:SET ENABLE_SET_GLOBAL = true; SET GLOBAL PARTITIONS_HEATMAP_COLLECTION_ONLY = 'tpcc,tpch'; -
To collect heatmap data for the
customerandorderlogical tables across all logical databases:SET ENABLE_SET_GLOBAL = true; SET GLOBAL PARTITIONS_HEATMAP_COLLECTION_ONLY = '#customer,#order'; or SET GLOBAL PARTITIONS_HEATMAP_COLLECTION_ONLY = '#customer&order'; -
To collect heatmap data for all logical tables in all logical databases:
SET ENABLE_SET_GLOBAL = true; SET GLOBAL PARTITIONS_HEATMAP_COLLECTION_ONLY = '';