Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add syntax diagram for show stats_buckets #3321

Merged
merged 4 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added media/sqlgram/SHOW_STATS_BUCKETS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ SHOW STATS_HISTOGRAMS [ShowLikeOrWhere];
SHOW STATS_BUCKETS [ShowLikeOrWhere];
```

语法图:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个语法图在 SHOW STATS_BUCKETS 自己的文档说明就可以了吧?在统计信息的文档里说明没有必要?而且这篇文档其他类似的语句也都没有提供语法图 @lawyerphx @zz-jason 你们觉得呢

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@winoros 看看呢,我觉得这个文档中的一部分内容可以挪到介绍 analyze 语句的那篇文档中去

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHOW STATS_BUCKETS 现在没有自己的文档吗

Copy link
Contributor Author

@danmay319 danmay319 May 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yikeke 没有,我和 mentor 商量了一下暂时加在 statistics.md 里面

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emm... 这样对于用户来说,信息可能不是特别容易获得。

不过如果这个 SHOW STATS_BUCKETS 目前只有 statistics 文档里提到了,可以暂时就这样处理;如果有多个文档都提到了 SHOW STATS_BUCKETS,建议把 SHOW STATS_BUCKETS 单拎出来写个独立文档,方便用户查询和内部引用。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kissmydb PTAL,坤爷代表用户的声音,坤爷觉得 ok 的话我觉得可以暂时这样处理

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zz-jason ANALYZE 语句的话是只提了 ANALYZE 一个命令,不过那里是可以通过另请参阅把其他语法功能都串起来,就是改动可能多一些。。

Copy link
Contributor

@yikeke yikeke May 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge this PR now? @winoros @zz-jason @lawyerphx You can merge it if you have no further edits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge it. The discussion above can be improved in the future.


![SHOW STATS_BUCKETS](/media/sqlgram/SHOW_STATS_BUCKETS.png)
danmay319 marked this conversation as resolved.
Show resolved Hide resolved

该语句会输出所有桶的信息,你可以通过 ShowLikeOrWhere 来筛选需要的信息。

目前 `SHOW STATS_BUCKETS` 会输出 10 列,具体如下:
Expand Down