Files
doris/docs/en/sql-reference/sql-statements/Administration/ADMIN-SHOW-DATA-SKEW.md
Mingyu Chen 2823e4daba [Feature] Support SHOW DATA SKEW stmt (#6219)
SHOW DATA SKEW FROM tbl PARTITION(p1)

to view the data distribution of a specified partition

```
mysql> admin show data skew from tbl1 partition(tbl1);
+-----------+-------------+-------+---------+
| BucketIdx | AvgDataSize | Graph | Percent |
+-----------+-------------+-------+---------+
| 0         | 0           |       | 100.00% |
+-----------+-------------+-------+---------+
1 row in set (0.01 sec)
```

Also modify the result of `admin show replica distribution`, add replica size distribution

```
mysql> admin show replica distribution from tbl1 partition(tbl1);
+-----------+------------+-------------+----------+------------+-----------+-------------+
| BackendId | ReplicaNum | ReplicaSize | NumGraph | NumPercent | SizeGraph | SizePercent |
+-----------+------------+-------------+----------+------------+-----------+-------------+
| 10002     | 1          | 0           | >        | 100.00%    |           | 100.00%     |
+-----------+------------+-------------+----------+------------+-----------+-------------+
```
2021-08-05 14:05:41 +08:00

1.5 KiB

title, language
title language
ADMIN SHOW DATA SKEW en

ADMIN SHOW DATA SKEW

description

This statement is used to view the data skew of a table or a partition.

grammar:

    ADMIN SHOW DATA SKEW FROM [db_name.]tbl_name [PARTITION (p1)];

Description:

	1. Only one partition must be specified. For non-partitioned tables, the partition name is the same as the table name.
	2. The result will show the data volume of each bucket under the specified partition, and the proportion of the data volume of each bucket in the total data volume.

example

1. View the data skew of the table

    ADMIN SHOW DATA SKEW FROM db1.test PARTITION(p1);

keyword

ADMIN, SHOW, DATA, SKEW