[Feature] Support SHOW DATA SKEW stmt#6219
Merged
morningman merged 3 commits intoapache:masterfrom Aug 5, 2021
Merged
Conversation
EmmyMiao87
reviewed
Jul 14, 2021
| 说明: | ||
|
|
||
| 1. 必须指定且仅指定一个分区。对于非分区表,分区名称同表名。 | ||
| 2. 结果将展示指定分区下,各个分桶的数据量,以及每个分桶数据量在总数据量中的占比。 |
|
|
||
| 语法: | ||
|
|
||
| ADMIN SHOW DATA SKEW FROM [db_name.]tbl_name [PARTITION (p1)]; |
Contributor
There was a problem hiding this comment.
如果 partition 是必填项,那么不用加 []
| KW_REPAIR, KW_REPEATABLE, KW_REPOSITORY, KW_REPOSITORIES, KW_REPLACE, KW_REPLACE_IF_NOT_NULL, KW_REPLICA, KW_RESOURCE, KW_RESOURCES, KW_RESTORE, KW_RETURNS, KW_RESUME, KW_REVOKE, | ||
| KW_RIGHT, KW_ROLE, KW_ROLES, KW_ROLLBACK, KW_ROLLUP, KW_ROUTINE, KW_ROW, KW_ROWS, | ||
| KW_S3, KW_SCHEMA, KW_SCHEMAS, KW_SECOND, KW_SELECT, KW_SEMI, KW_SERIALIZABLE, KW_SESSION, KW_SET, KW_SETS, KW_SET_VAR, KW_SHOW, KW_SIGNED, | ||
| KW_SKEW, |
Contributor
There was a problem hiding this comment.
Pay attention to the format
| dbName = ClusterNamespace.getFullName(getClusterName(), tblRef.getName().getDb()); | ||
| } | ||
|
|
||
| tblRef.getName().setDb(dbName); |
Contributor
There was a problem hiding this comment.
analyze tblRef before check partition
SHOW DATA SKEW FROM tbl PARTITION(p1) to view the data distribution of a specified partition
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
Closed
EmmyMiao87
pushed a commit
to EmmyMiao87/incubator-doris
that referenced
this pull request
Nov 10, 2021
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% | +-----------+------------+-------------+----------+------------+-----------+-------------+ ``` Change-Id: I74e392cec4a72bbb8a4b5ef9e2b7302a062d6b88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
SHOW DATA SKEW FROM tbl PARTITION(p1)
to view the data distribution of a specified partition
Also modify the result of
admin show replica distribution, add replica size distributionTypes of changes
What types of changes does your code introduce to Doris?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...