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

如何查询分区表信息 #2217

Closed
xiemiaogit opened this issue Feb 7, 2020 · 6 comments
Closed

如何查询分区表信息 #2217

xiemiaogit opened this issue Feb 7, 2020 · 6 comments

Comments

@xiemiaogit
Copy link

建了分区表,可以正常操作,但是貌似没有地方可以查看分区的信息,请问TIDB要如何查看。

@lilin90
Copy link
Member

lilin90 commented Feb 7, 2020

@xiemiaogit 你看下这个文档可以解决你的问题吗?

@xiemiaogit
Copy link
Author

@lilin90 你好,文档看了,文档只是说可以查看某个分区下的具体数据。但我想看某张表有哪些分区,就像MySQL的partitions表那样。
我有注意到文档上说暂时不支持partitions表,所以有别的方式吗。

@lilin90
Copy link
Member

lilin90 commented Feb 8, 2020

@tiancaiamao PTAL~ Thanks!

@tiancaiamao
Copy link
Contributor

pingcap/tidb#14347

这个 PR 之后的可以通过 infoschema 表里面去查看信息( TiDB 版本要求 master 或者还未发布的 4.0GA)。

之前的版本可以用

explain select * from t

观察 plan 的结构,如果是 union 的就是分区表,否则是普通表。
@xiemiaogit

@TomShawn
Copy link
Contributor

TomShawn commented Mar 3, 2020

@xiemiaogit 以上回答解决你的问题了吗?

@TomShawn
Copy link
Contributor

TomShawn commented Apr 1, 2020

@xiemiaogit 为更好管理和跟进 issue,暂时关闭本 issue。如仍有问题,欢迎提新的 issue。

@TomShawn TomShawn closed this as completed Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants