Skip to content

[Improvement](statistics) show analysis job info#16305

Merged
morrySnow merged 2 commits intoapache:masterfrom
weizhengte:statistics-show
Feb 3, 2023
Merged

[Improvement](statistics) show analysis job info#16305
morrySnow merged 2 commits intoapache:masterfrom
weizhengte:statistics-show

Conversation

@weizhengte
Copy link
Contributor

@weizhengte weizhengte commented Feb 1, 2023

Proposed changes

Supports query analysis job info.

syntax:

SHOW ANALYZE
    [TABLE | ID]
    [
        WHERE
        [STATE = ["PENDING"|"RUNNING"|"FINISHED"|"FAILED"]]
    ]
    [ORDER BY ...]
    [LIMIT limit];

example:

SHOW ANALYZE test_table1 WHERE state = 'FINISHED' ORDER BY col_name LIMIT 1;

result:

job_id catalog_name db_name tbl_name col_name job_type analysis_type message last_exec_time_in_ms state schedule_type
10086 internal default_cluster:test test_table1 pv MANUAL FULL 2023-02-01 09:36:41 FINISHED ONCE

Issue Number: close #xxx

Problem summary

Describe your changes.

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes (If Yes, please explain WHY)
    • No

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...

@github-actions github-actions bot added the area/planner Issues or PRs related to the query planner label Feb 1, 2023
@weizhengte weizhengte marked this pull request as ready for review February 1, 2023 02:44
@weizhengte
Copy link
Contributor Author

@morrySnow @Kikyou1997 review plz

@weizhengte weizhengte changed the title [Improvement](statistics) show Analysis job info [Improvement](statistics) show analysis job info Feb 1, 2023
@Kikyou1997
Copy link
Contributor

Kikyou1997 commented Feb 1, 2023

I think Task shouldn't be visible to user

@hello-stephen
Copy link
Contributor

hello-stephen commented Feb 1, 2023

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.21 seconds
load time: 479 seconds
storage size: 17170709445 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230202120651_clickbench_pr_89514.html

@weizhengte
Copy link
Contributor Author

I think Task shouldn't be visible to user

Ok, I'll remove it later

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

PR approved by anyone and no changes requested.

@morrySnow morrySnow merged commit ad78f31 into apache:master Feb 3, 2023
@weizhengte weizhengte deleted the statistics-show branch February 4, 2023 03:26
dutyu pushed a commit to dutyu/doris that referenced this pull request Feb 6, 2023
Supports query analysis job info.

syntax:

```SQL
SHOW ANALYZE
    [TABLE | ID]
    [
        WHERE
        [STATE = ["PENDING"|"RUNNING"|"FINISHED"|"FAILED"]]
    ]
    [ORDER BY ...]
    [LIMIT limit];
```
example:

```SQL
SHOW ANALYZE test_table1 WHERE state = 'FINISHED' ORDER BY col_name LIMIT 1;
```

result:

| job_id  | catalog_name | db_name              | tbl_name    | col_name | job_type | analysis_type | message | last_exec_time_in_ms | state    | schedule_type |
| ------ |  ------------ | -------------------- | ----------- | -------- | -------- | ------------- | ------- | -------------------- | -------- | ------------- |
| 10086   | internal     | default_cluster:test | test_table1 | pv       | MANUAL   | FULL          |         | 2023-02-01 09:36:41          | FINISHED | ONCE          |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/planner Issues or PRs related to the query planner reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants