Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
0d6aba6e
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0d6aba6e
编写于
1月 20, 2021
作者:
A
Anton Popov
提交者:
GitHub
1月 20, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19208 from adevyatova/annadevyatova-DOCSUP-4439-clusters
DOCSUP-4439: Add SHOW CLUSTER(s) queries docs
上级
1e4b32aa
29dab7cb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
73 addition
and
0 deletion
+73
-0
docs/en/sql-reference/statements/show.md
docs/en/sql-reference/statements/show.md
+73
-0
未找到文件。
docs/en/sql-reference/statements/show.md
浏览文件 @
0d6aba6e
...
...
@@ -348,4 +348,77 @@ Returns a [quota](../../operations/quotas.md) consumption for all users or for c
SHOW
[
CURRENT
]
QUOTA
```
## SHOW CLUSTER(s) {#show-cluster-statement}
Returns a list of clusters. All available clusters are listed in the
[
system.clusters
](
../../operations/system-tables/clusters.md
)
table.
!!! info "Note"
`SHOW CLUSTER name`
query displays the contents of system.clusters table for this cluster.
### Syntax {#show-cluster-syntax}
```
sql
SHOW
CLUSTER
'<name>'
SWOW
CLUSTERS
[
LIKE
|
NOT
LIKE
'<pattern>'
]
[
LIMIT
<
N
>
]
```
### Examples
Query:
```
sql
SHOW
CLUSTERS
;
```
Result:
```
text
┌─cluster──────────────────────────────────────┐
│ test_cluster_two_shards │
│ test_cluster_two_shards_internal_replication │
│ test_cluster_two_shards_localhost │
│ test_shard_localhost │
│ test_shard_localhost_secure │
│ test_unavailable_shard │
└──────────────────────────────────────────────┘
```
Query:
```
sql
SHOW
CLUSTERS
LIKE
'test%'
LIMIT
1
;
```
Result:
```
text
┌─cluster─────────────────┐
│ test_cluster_two_shards │
└─────────────────────────┘
```
Query:
```
sql
SHOW
CLUSTER
'test_shard_localhost'
FORMAT
Vertical
;
```
Result:
```
text
Row 1:
──────
cluster: test_shard_localhost
shard_num: 1
shard_weight: 1
replica_num: 1
host_name: localhost
host_address: 127.0.0.1
port: 9000
is_local: 1
user: default
default_database:
errors_count: 0
estimated_recovery_time: 0
```
[
Original article
](
https://clickhouse.tech/docs/en/query_language/show/
)
<!--hide-->
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录