This is an automated email from the ASF dual-hosted git repository.
kassiez pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new f0d84a7897c [Fix](docs)SHOW TABLET, SHOW TABLETS BELONG (#2188)
f0d84a7897c is described below
commit f0d84a7897cd647633b140d0dcf13fe9d5ca9dbe
Author: bingquanzhao <[email protected]>
AuthorDate: Wed Apr 23 19:39:19 2025 +0800
[Fix](docs)SHOW TABLET, SHOW TABLETS BELONG (#2188)
## Versions
- [x] dev
- [x] 3.0
- [x] 2.1
- [x] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
.../data-and-status-management/SHOW-TABLET.md | 73 +++++++++++----------
.../SHOW-TABLETS-BELONG.md | 73 +++++++++++++++------
.../data-and-status-management/SHOW-TABLET.md | 56 ++++++++++++----
.../SHOW-TABLETS-BELONG.md | 75 ++++++++++++++-------
.../sql-reference/Show-Statements/SHOW-TABLET.md | 64 +++++++++++++-----
.../Show-Statements/SHOW-TABLETS-BELONG.md | 74 +++++++++++++--------
.../data-and-status-management/SHOW-TABLET.md | 57 ++++++++++++----
.../SHOW-TABLETS-BELONG.md | 76 +++++++++++++++-------
.../data-and-status-management/SHOW-TABLET.md | 56 ++++++++++++----
.../SHOW-TABLETS-BELONG.md | 75 ++++++++++++++-------
.../sql-reference/Show-Statements/SHOW-TABLET.md | 64 +++++++++++++-----
.../Show-Statements/SHOW-TABLETS-BELONG.md | 74 +++++++++++++--------
.../data-and-status-management/SHOW-TABLET.md | 72 +++++++++++---------
.../SHOW-TABLETS-BELONG.md | 74 ++++++++++++++-------
.../data-and-status-management/SHOW-TABLET.md | 73 +++++++++++----------
.../SHOW-TABLETS-BELONG.md | 73 +++++++++++++++------
16 files changed, 755 insertions(+), 354 deletions(-)
diff --git
a/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
b/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
index 9c384433e5e..094caf18bc5 100644
---
a/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
+++
b/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
@@ -1,6 +1,6 @@
---
{
- "title": "SHOW TABLETS",
+ "title": "SHOW TABLET",
"language": "en"
}
---
@@ -26,54 +26,61 @@ under the License.
-
## Description
-This statement is used to list tablets of the specified table (only for
administrators)
+This statement is used to show details of a specific tablet (only for
administrators).
-grammar:
+## Syntax
```sql
-SHOW TABLETS FROM [database.]table [PARTITIONS(p1,p2)]
-[WHERE where_condition]
-[ORDER BY col_name]
-[LIMIT [offset,] row_count]
+SHOW TABLET <tablet_id>;
```
-1. **Syntax Description:**
+## Required Parameters
-where_condition could be one of:
-```
-Version = version
-state = "NORMAL|ROLLUP|CLONE|DECOMMISSION"
-BackendId = backend_id
-IndexName = rollup_name
-```
-or compound them with operator `AND`.
+**1. `<tablet_id>`**
-## Example
+> The ID of the specific tablet to display information for.
-1. list all tablets of the specified table
+## Return Value
- ```sql
- SHOW TABLETS FROM example_db.table_name;
- ```
+When using `SHOW TABLET <tablet_id>`, the following columns are returned:
-2. list all tablets of the specified partitions
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| PartitionName | String | The name of the partition that contains the
tablet. |
+| IndexName | String | The name of the index that contains the tablet.
|
+| DbId | Int | The ID of the database.
|
+| TableId | Int | The ID of the table.
|
+| PartitionId | Int | The ID of the partition.
|
+| IndexId | Int | The ID of the index.
|
+| IsSync | Boolean | Whether the tablet is in sync with its replicas.
|
+| Order | Int | The order of the tablet.
|
+| QueryHits | Int | The number of query hits on this tablet.
|
+| DetailCmd | String | The command to get more detailed information
about the tablet. |
- ```sql
- SHOW TABLETS FROM example_db.table_name PARTITIONS(p1, p2);
- ```
+## Access Control Requirements
-3. list all DECOMMISSION tablets on the specified backend
+The user executing this SQL command must have at least the following
privileges:
- ```sql
- SHOW TABLETS FROM example_db.table_name WHERE state="DECOMMISSION" AND
BackendId=11003;
- ```
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
-## Keywords
+## Examples
- SHOW, TABLETS
+Show details of a specific tablet:
-## Best Practice
+```sql
+SHOW TABLET 10145;
+```
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
b/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
index 9b1b62c56fb..802360dc372 100644
---
a/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
+++
b/docs/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
@@ -25,41 +25,72 @@ under the License.
-->
-### Description
-Used to show tablets and information of their belonging table
+## Description
-grammar:
+This statement is used to show tablets and information of their belonging
table.
+
+## Syntax
```sql
-SHOW TABLETS BELONG tablet-ids;
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
```
-illustrate:
+## Required Parameters
+
+**1. `<tablet_id>`**
+
+> One or more tablet IDs, separated by commas. Duplicate IDs will be
deduplicated in the result.
+
+## Return Value
+
+When using `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...`, the following
columns are returned:
+
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| TableSize | String | The size of the table (e.g., "8.649 KB").
|
+| PartitionNum | Int | The number of partitions in the table.
|
+| BucketNum | Int | The number of buckets in the table.
|
+| ReplicaCount | Int | The number of replicas in the table.
|
+| TabletIds | Array | The list of tablet IDs that belong to the table.
|
-1. tablet-ids: one or more tablet-ids, with comma separated
-2. Columns of result keep same with result of `SHOW-DATA` for the same table
+## Access Control Requirements
-### Example
+The user executing this SQL command must have at least the following
privileges:
-1. show information of four tablet-ids (actually, three tablet-ids. Result
will be deduplicated)
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+## Examples
- ```
+Show information about a specific tablet:
+
+```sql
+SHOW TABLETS BELONG 10145;
+```
+
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
+
+Show information about multiple tablets:
+
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
+
+```text
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
-
-### Keywords
-
- SHOW, TABLETS, BELONG
-
-### Best Practice
-
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
index 239b57f4307..7817990fdc8 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
@@ -27,25 +27,59 @@ under the License.
## 描述
-该语句用于显示指定 tablet id 信息(仅管理员使用)
+该语句用于显示指定 tablet id 信息(仅管理员使用)。
-语法:
+## 语法
```sql
-SHOW TABLET tablet_id
+SHOW TABLET <tablet_id>;
```
-## 示例
+## 必选参数
+
+**1. `<tablet_id>`**
+
+> 要显示信息的特定 tablet 的 ID。
-1. 显示指定 tablet id 为 10000 的 tablet 的父层级 id 信息
+## 返回值
- ```sql
- SHOW TABLET 10000;
- ```
+使用 `SHOW TABLET <tablet_id>` 时,将返回以下列:
-## 关键词
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| PartitionName | String | 包含该 tablet 的分区名称。
|
+| IndexName | String | 包含该 tablet 的索引名称。
|
+| DbId | Int | 数据库的 ID。
|
+| TableId | Int | 表的 ID。
|
+| PartitionId | Int | 分区的 ID。
|
+| IndexId | Int | 索引的 ID。
|
+| IsSync | Boolean | 该 tablet 是否与其副本同步。
|
+| Order | Int | tablet 的顺序。
|
+| QueryHits | Int | 该 tablet 上的查询命中次数。
|
+| DetailCmd | String | 获取有关该 tablet 更详细信息的命令。
|
- SHOW, TABLET
+## 权限控制
-### 最佳实践
+执行此 SQL 命令的用户必须至少具有以下权限:
+
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
+
+## 示例
+显示特定 tablet 的详细信息:
+
+```sql
+SHOW TABLET 10145;
+```
+
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
index 1c8f2a7e0b1..1d3b7b48c01 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
@@ -1,7 +1,7 @@
---
{
"title": "SHOW TABLETS BELONG",
- "language": "en"
+ "language": "zh-CN"
}
---
@@ -28,38 +28,69 @@ under the License.
## 描述
-Used to show tablets and information of their belonging table
+该语句用于显示指定 tablet 及其所属表的信息。
-grammar:
+## 语法
```sql
-SHOW TABLETS BELONG tablet-ids;
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
```
-illustrate:
+## 必选参数
-1. tablet-ids: one or more tablet-ids, with comma separated
-2. Columns of result keep same with result of `SHOW-DATA` for the same table
+**1. `<tablet_id>`**
-## 示例
+> 一个或多个 tablet ID,用逗号分隔。结果中会对重复的 ID 进行去重。
+
+## 返回值
+
+使用 `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...` 时,将返回以下列:
+
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| TableSize | String | 表的大小(例如:"8.649 KB")。
|
+| PartitionNum | Int | 表中的分区数量。
|
+| BucketNum | Int | 表中的分桶数量。
|
+| ReplicaCount | Int | 表中的副本数量。
|
+| TabletIds | Array | 属于该表的 tablet ID 列表。
|
+
+## 权限控制
+
+执行此 SQL 命令的用户必须至少具有以下权限:
+
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
-1. show information of four tablet-ids (actually, three tablet-ids. Result
will be deduplicated)
+## 示例
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+显示特定 tablet 的信息:
- ```sql
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- | DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- | default_cluster:db1 | kec | 613.000 B | 379 | 604 |
604 | [78880, 78382] |
- | default_cluster:db1 | test | 1.874 KB | 1 | 1 |
1 | [27028] |
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
+```sql
+SHOW TABLETS BELONG 10145;
+```
-## 关键词
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
- SHOW, TABLETS, BELONG
+显示多个 tablet 的信息:
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
+```text
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
+| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
index 8953d2b8837..9753753233e 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
@@ -1,6 +1,6 @@
---
{
- "title": "SHOW-TABLET",
+ "title": "SHOW TABLET",
"language": "zh-CN"
}
---
@@ -24,33 +24,61 @@ specific language governing permissions and limitations
under the License.
-->
-## SHOW-TABLET
-
-### Name
-
-SHOW TABLET
-
## 描述
-该语句用于显示指定tablet id 信息(仅管理员使用)
+该语句用于显示指定tablet id 信息(仅管理员使用)。
-语法:
+## 语法
```sql
-SHOW TABLET tablet_id
+SHOW TABLET <tablet_id>;
```
-## 举例
+## 必选参数
+
+**1. `<tablet_id>`**
+
+> 要显示信息的特定 tablet 的 ID。
+
+## 返回值
-1. 显示指定 tablet id 为 10000 的 tablet 的父层级 id 信息
+使用 `SHOW TABLET <tablet_id>` 时,将返回以下列:
- ```sql
- SHOW TABLET 10000;
- ```
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| PartitionName | String | 包含该 tablet 的分区名称。
|
+| IndexName | String | 包含该 tablet 的索引名称。
|
+| DbId | Int | 数据库的 ID。
|
+| TableId | Int | 表的 ID。
|
+| PartitionId | Int | 分区的 ID。
|
+| IndexId | Int | 索引的 ID。
|
+| IsSync | Boolean | 该 tablet 是否与其副本同步。
|
+| Order | Int | tablet 的顺序。
|
+| QueryHits | Int | 该 tablet 上的查询命中次数。
|
+| DetailCmd | String | 获取有关该 tablet 更详细信息的命令。
|
-### Keywords
+## 权限控制
- SHOW, TABLET
+执行此 SQL 命令的用户必须至少具有以下权限:
-### Best Practice
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
+## 示例
+
+显示特定 tablet 的详细信息:
+
+```sql
+SHOW TABLET 10145;
+```
+
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
index 8500748a99b..66eb98ba891 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
@@ -1,6 +1,6 @@
---
{
- "title": "SHOW-TABLETS-BELONG",
+ "title": "SHOW TABLETS BELONG",
"language": "zh-CN"
}
---
@@ -24,51 +24,71 @@ specific language governing permissions and limitations
under the License.
-->
+## 描述
+该语句用于显示指定 tablet 及其所属表的信息。
-## SHOW-TABLETS-BELONG
+## 语法
+```sql
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
+```
+## 必选参数
-### Name
+**1. `<tablet_id>`**
-SHOW TABLETS BELONG
+> 一个或多个 tablet ID,用逗号分隔。结果中会对重复的 ID 进行去重。
-## 描述
+## 返回值
-该语句用于展示指定 Tablets 归属的表的信息
+使用 `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...` 时,将返回以下列:
-语法:
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| TableSize | String | 表的大小(例如:"8.649 KB")。
|
+| PartitionNum | Int | 表中的分区数量。
|
+| BucketNum | Int | 表中的分桶数量。
|
+| ReplicaCount | Int | 表中的副本数量。
|
+| TabletIds | Array | 属于该表的 tablet ID 列表。
|
-```sql
-SHOW TABLETS BELONG tablet-ids;
-```
+## 权限控制
-说明:
+执行此 SQL 命令的用户必须至少具有以下权限:
-1. tablet-ids:代表一到多个 tablet-id 构成的列表。如有多个,使用逗号分隔
-2. 结果中 table 相关的信息和 `SHOW-DATA` 语句的口径一致
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
-## 举例
+## 示例
-1. 展示 3 个 tablet-id 的相关信息(tablet-id 可去重)
+显示特定 tablet 的信息:
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+```sql
+SHOW TABLETS BELONG 10145;
+```
+
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
- ```
+显示多个 tablet 的信息:
+
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
+
+```text
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
-
-### Keywords
-
- SHOW, TABLETS, BELONG
-
-### Best Practice
-
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
index 856163bbed1..7817990fdc8 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
@@ -27,26 +27,59 @@ under the License.
## 描述
-该语句用于显示指定 tablet id 信息(仅管理员使用)
+该语句用于显示指定 tablet id 信息(仅管理员使用)。
-
-语法:
+## 语法
```sql
-SHOW TABLET tablet_id
+SHOW TABLET <tablet_id>;
```
-## 示例
+## 必选参数
+
+**1. `<tablet_id>`**
+
+> 要显示信息的特定 tablet 的 ID。
+
+## 返回值
+
+使用 `SHOW TABLET <tablet_id>` 时,将返回以下列:
-1. 显示指定 tablet id 为 10000 的 tablet 的父层级 id 信息
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| PartitionName | String | 包含该 tablet 的分区名称。
|
+| IndexName | String | 包含该 tablet 的索引名称。
|
+| DbId | Int | 数据库的 ID。
|
+| TableId | Int | 表的 ID。
|
+| PartitionId | Int | 分区的 ID。
|
+| IndexId | Int | 索引的 ID。
|
+| IsSync | Boolean | 该 tablet 是否与其副本同步。
|
+| Order | Int | tablet 的顺序。
|
+| QueryHits | Int | 该 tablet 上的查询命中次数。
|
+| DetailCmd | String | 获取有关该 tablet 更详细信息的命令。
|
- ```sql
- SHOW TABLET 10000;
- ```
+## 权限控制
-## 关键词
+执行此 SQL 命令的用户必须至少具有以下权限:
- SHOW, TABLET
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
-## 最佳实践
+## 示例
+
+显示特定 tablet 的详细信息:
+
+```sql
+SHOW TABLET 10145;
+```
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
index 23005251bcd..1d3b7b48c01 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
@@ -26,41 +26,71 @@ under the License.
+## 描述
-### 描述
+该语句用于显示指定 tablet 及其所属表的信息。
-该语句用于展示指定 Tablets 归属的表的信息
-
-语法:
+## 语法
```sql
-SHOW TABLETS BELONG tablet-ids;
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
```
-说明:
+## 必选参数
+
+**1. `<tablet_id>`**
-1. tablet-ids:代表一到多个 tablet-id 构成的列表。如有多个,使用逗号分隔
-2. 结果中 table 相关的信息和 `SHOW-DATA` 语句的口径一致
+> 一个或多个 tablet ID,用逗号分隔。结果中会对重复的 ID 进行去重。
-### 示例
+## 返回值
-1. 展示 3 个 tablet-id 的相关信息(tablet-id 可去重)
+使用 `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...` 时,将返回以下列:
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| TableSize | String | 表的大小(例如:"8.649 KB")。
|
+| PartitionNum | Int | 表中的分区数量。
|
+| BucketNum | Int | 表中的分桶数量。
|
+| ReplicaCount | Int | 表中的副本数量。
|
+| TabletIds | Array | 属于该表的 tablet ID 列表。
|
- ```sql
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- | DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- | default_cluster:db1 | kec | 613.000 B | 379 | 604 |
604 | [78880, 78382] |
- | default_cluster:db1 | test | 1.874 KB | 1 | 1 |
1 | [27028] |
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
+## 权限控制
-### 关键词
+执行此 SQL 命令的用户必须至少具有以下权限:
- SHOW, TABLETS, BELONG
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
+## 示例
+显示特定 tablet 的信息:
+
+```sql
+SHOW TABLETS BELONG 10145;
+```
+
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
+
+显示多个 tablet 的信息:
+
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
+
+```text
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
+| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
index 239b57f4307..7817990fdc8 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
@@ -27,25 +27,59 @@ under the License.
## 描述
-该语句用于显示指定 tablet id 信息(仅管理员使用)
+该语句用于显示指定 tablet id 信息(仅管理员使用)。
-语法:
+## 语法
```sql
-SHOW TABLET tablet_id
+SHOW TABLET <tablet_id>;
```
-## 示例
+## 必选参数
+
+**1. `<tablet_id>`**
+
+> 要显示信息的特定 tablet 的 ID。
-1. 显示指定 tablet id 为 10000 的 tablet 的父层级 id 信息
+## 返回值
- ```sql
- SHOW TABLET 10000;
- ```
+使用 `SHOW TABLET <tablet_id>` 时,将返回以下列:
-## 关键词
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| PartitionName | String | 包含该 tablet 的分区名称。
|
+| IndexName | String | 包含该 tablet 的索引名称。
|
+| DbId | Int | 数据库的 ID。
|
+| TableId | Int | 表的 ID。
|
+| PartitionId | Int | 分区的 ID。
|
+| IndexId | Int | 索引的 ID。
|
+| IsSync | Boolean | 该 tablet 是否与其副本同步。
|
+| Order | Int | tablet 的顺序。
|
+| QueryHits | Int | 该 tablet 上的查询命中次数。
|
+| DetailCmd | String | 获取有关该 tablet 更详细信息的命令。
|
- SHOW, TABLET
+## 权限控制
-### 最佳实践
+执行此 SQL 命令的用户必须至少具有以下权限:
+
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
+
+## 示例
+显示特定 tablet 的详细信息:
+
+```sql
+SHOW TABLET 10145;
+```
+
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
index 1c8f2a7e0b1..1d3b7b48c01 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
@@ -1,7 +1,7 @@
---
{
"title": "SHOW TABLETS BELONG",
- "language": "en"
+ "language": "zh-CN"
}
---
@@ -28,38 +28,69 @@ under the License.
## 描述
-Used to show tablets and information of their belonging table
+该语句用于显示指定 tablet 及其所属表的信息。
-grammar:
+## 语法
```sql
-SHOW TABLETS BELONG tablet-ids;
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
```
-illustrate:
+## 必选参数
-1. tablet-ids: one or more tablet-ids, with comma separated
-2. Columns of result keep same with result of `SHOW-DATA` for the same table
+**1. `<tablet_id>`**
-## 示例
+> 一个或多个 tablet ID,用逗号分隔。结果中会对重复的 ID 进行去重。
+
+## 返回值
+
+使用 `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...` 时,将返回以下列:
+
+| 列名 | 数据类型 | 说明
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | 包含该 tablet 的数据库名称。
|
+| TableName | String | 包含该 tablet 的表名称。
|
+| TableSize | String | 表的大小(例如:"8.649 KB")。
|
+| PartitionNum | Int | 表中的分区数量。
|
+| BucketNum | Int | 表中的分桶数量。
|
+| ReplicaCount | Int | 表中的副本数量。
|
+| TabletIds | Array | 属于该表的 tablet ID 列表。
|
+
+## 权限控制
+
+执行此 SQL 命令的用户必须至少具有以下权限:
+
+| 权限 | 对象 | 说明
|
+|:------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | 需要执行数据库的管理操作,包括管理表、分区和系统级命令。
|
-1. show information of four tablet-ids (actually, three tablet-ids. Result
will be deduplicated)
+## 示例
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+显示特定 tablet 的信息:
- ```sql
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- | DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- | default_cluster:db1 | kec | 613.000 B | 379 | 604 |
604 | [78880, 78382] |
- | default_cluster:db1 | test | 1.874 KB | 1 | 1 |
1 | [27028] |
-
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
+```sql
+SHOW TABLETS BELONG 10145;
+```
-## 关键词
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
- SHOW, TABLETS, BELONG
+显示多个 tablet 的信息:
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
+```text
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
+| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
++---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
+```
diff --git
a/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
b/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
index e9e060d4890..ba6bf1b4ae8 100644
---
a/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
+++
b/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLET.md
@@ -1,6 +1,6 @@
---
{
- "title": "SHOW-TABLET",
+ "title": "SHOW TABLET",
"language": "en"
}
---
@@ -24,33 +24,61 @@ specific language governing permissions and limitations
under the License.
-->
-## SHOW-TABLET
+## Description
-### Name
+This statement is used to show details of a specific tablet (only for
administrators).
-SHOW TABLET
+## Syntax
-### Description
+```sql
+SHOW TABLET <tablet_id>;
+```
-This statement is used to display the specified tablet id information (only
for administrators)
+## Required Parameters
-grammar:
+**1. `<tablet_id>`**
-```sql
-SHOW TABLET tablet_id
-```
+> The ID of the specific tablet to display information for.
+
+## Return Value
-### Example
+When using `SHOW TABLET <tablet_id>`, the following columns are returned:
-1. Display the parent-level id information of the tablet with the specified
tablet id of 10000
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| PartitionName | String | The name of the partition that contains the
tablet. |
+| IndexName | String | The name of the index that contains the tablet.
|
+| DbId | Int | The ID of the database.
|
+| TableId | Int | The ID of the table.
|
+| PartitionId | Int | The ID of the partition.
|
+| IndexId | Int | The ID of the index.
|
+| IsSync | Boolean | Whether the tablet is in sync with its replicas.
|
+| Order | Int | The order of the tablet.
|
+| QueryHits | Int | The number of query hits on this tablet.
|
+| DetailCmd | String | The command to get more detailed information
about the tablet. |
- ```sql
- SHOW TABLET 10000;
- ```
+## Access Control Requirements
-### Keywords
+The user executing this SQL command must have at least the following
privileges:
- SHOW, TABLET
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
-### Best Practice
+## Examples
+Show details of a specific tablet:
+
+```sql
+SHOW TABLET 10145;
+```
+
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
b/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
index 4719bc33649..21b66ca377b 100644
---
a/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
+++
b/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-TABLETS-BELONG.md
@@ -1,6 +1,6 @@
---
{
- "title": "SHOW-TABLETS-BELONG",
+ "title": "SHOW TABLETS BELONG",
"language": "en"
}
---
@@ -24,51 +24,71 @@ specific language governing permissions and limitations
under the License.
-->
+## Description
+This statement is used to show tablets and information of their belonging
table.
-## SHOW-TABLETS-BELONG
+## Syntax
+```sql
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
+```
+## Required Parameters
-### Name
+**1. `<tablet_id>`**
-SHOW TABLETS BELONG
+> One or more tablet IDs, separated by commas. Duplicate IDs will be
deduplicated in the result.
-### Description
+## Return Value
-Used to show tablets and information of their belonging table
+When using `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...`, the following
columns are returned:
-grammar:
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| TableSize | String | The size of the table (e.g., "8.649 KB").
|
+| PartitionNum | Int | The number of partitions in the table.
|
+| BucketNum | Int | The number of buckets in the table.
|
+| ReplicaCount | Int | The number of replicas in the table.
|
+| TabletIds | Array | The list of tablet IDs that belong to the table.
|
-```sql
-SHOW TABLETS BELONG tablet-ids;
-```
+## Access Control Requirements
+
+The user executing this SQL command must have at least the following
privileges:
-illustrate:
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
-1. tablet-ids: one or more tablet-ids, with comma separated
-2. Columns of result keep same with result of `SHOW-DATA` for the same table
+## Examples
-### Example
+Show information about a specific tablet:
-1. show information of four tablet-ids (actually, three tablet-ids. Result
will be deduplicated)
+```sql
+SHOW TABLETS BELONG 10145;
+```
+
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+Show information about multiple tablets:
- ```
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
+
+```text
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
-
-### Keywords
-
- SHOW, TABLETS, BELONG
-
-### Best Practice
-
+```
diff --git
a/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
b/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
index 991b458126e..ba6bf1b4ae8 100644
---
a/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
+++
b/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
@@ -1,6 +1,6 @@
---
{
- "title": "SHOW TABLETS",
+ "title": "SHOW TABLET",
"language": "en"
}
---
@@ -26,51 +26,59 @@ under the License.
## Description
-This statement is used to list tablets of the specified table (only for
administrators)
+This statement is used to show details of a specific tablet (only for
administrators).
-grammar:
+## Syntax
```sql
-SHOW TABLETS FROM [database.]table [PARTITIONS(p1,p2)]
-[WHERE where_condition]
-[ORDER BY col_name]
-[LIMIT [offset,] row_count]
+SHOW TABLET <tablet_id>;
```
-1. **Syntax Description:**
+## Required Parameters
-where_condition could be one of:
-```
-Version = version
-state = "NORMAL|ROLLUP|CLONE|DECOMMISSION"
-BackendId = backend_id
-IndexName = rollup_name
-```
-or compound them with operator `AND`.
+**1. `<tablet_id>`**
-## Examples
+> The ID of the specific tablet to display information for.
-1. list all tablets of the specified table
+## Return Value
- ```sql
- SHOW TABLETS FROM example_db.table_name;
- ```
+When using `SHOW TABLET <tablet_id>`, the following columns are returned:
-2. list all tablets of the specified partitions
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| PartitionName | String | The name of the partition that contains the
tablet. |
+| IndexName | String | The name of the index that contains the tablet.
|
+| DbId | Int | The ID of the database.
|
+| TableId | Int | The ID of the table.
|
+| PartitionId | Int | The ID of the partition.
|
+| IndexId | Int | The ID of the index.
|
+| IsSync | Boolean | Whether the tablet is in sync with its replicas.
|
+| Order | Int | The order of the tablet.
|
+| QueryHits | Int | The number of query hits on this tablet.
|
+| DetailCmd | String | The command to get more detailed information
about the tablet. |
- ```sql
- SHOW TABLETS FROM example_db.table_name PARTITIONS(p1, p2);
- ```
+## Access Control Requirements
-3. list all DECOMMISSION tablets on the specified backend
+The user executing this SQL command must have at least the following
privileges:
- ```sql
- SHOW TABLETS FROM example_db.table_name WHERE state="DECOMMISSION" AND
BackendId=11003;
- ```
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
-## Keywords
+## Examples
- SHOW, TABLETS
+Show details of a specific tablet:
-## Best Practice
+```sql
+SHOW TABLET 10145;
+```
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
b/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
index 287a07ce0ab..21b66ca377b 100644
---
a/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
+++
b/versioned_docs/version-2.1/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
@@ -24,43 +24,71 @@ specific language governing permissions and limitations
under the License.
-->
+## Description
+This statement is used to show tablets and information of their belonging
table.
-### Description
-
-Used to show tablets and information of their belonging table
-
-grammar:
+## Syntax
```sql
-SHOW TABLETS BELONG tablet-ids;
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
```
-illustrate:
+## Required Parameters
+
+**1. `<tablet_id>`**
+
+> One or more tablet IDs, separated by commas. Duplicate IDs will be
deduplicated in the result.
+
+## Return Value
+
+When using `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...`, the following
columns are returned:
+
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| TableSize | String | The size of the table (e.g., "8.649 KB").
|
+| PartitionNum | Int | The number of partitions in the table.
|
+| BucketNum | Int | The number of buckets in the table.
|
+| ReplicaCount | Int | The number of replicas in the table.
|
+| TabletIds | Array | The list of tablet IDs that belong to the table.
|
+
+## Access Control Requirements
+
+The user executing this SQL command must have at least the following
privileges:
+
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
+
+## Examples
-1. tablet-ids: one or more tablet-ids, with comma separated
-2. Columns of result keep same with result of `SHOW-DATA` for the same table
+Show information about a specific tablet:
-### Example
+```sql
+SHOW TABLETS BELONG 10145;
+```
+
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
-1. show information of four tablet-ids (actually, three tablet-ids. Result
will be deduplicated)
+Show information about multiple tablets:
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
- ```
+```text
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
-
-### Keywords
-
- SHOW, TABLETS, BELONG
-
-### Best Practice
-
+```
diff --git
a/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
b/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
index 9c384433e5e..094caf18bc5 100644
---
a/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
+++
b/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLET.md
@@ -1,6 +1,6 @@
---
{
- "title": "SHOW TABLETS",
+ "title": "SHOW TABLET",
"language": "en"
}
---
@@ -26,54 +26,61 @@ under the License.
-
## Description
-This statement is used to list tablets of the specified table (only for
administrators)
+This statement is used to show details of a specific tablet (only for
administrators).
-grammar:
+## Syntax
```sql
-SHOW TABLETS FROM [database.]table [PARTITIONS(p1,p2)]
-[WHERE where_condition]
-[ORDER BY col_name]
-[LIMIT [offset,] row_count]
+SHOW TABLET <tablet_id>;
```
-1. **Syntax Description:**
+## Required Parameters
-where_condition could be one of:
-```
-Version = version
-state = "NORMAL|ROLLUP|CLONE|DECOMMISSION"
-BackendId = backend_id
-IndexName = rollup_name
-```
-or compound them with operator `AND`.
+**1. `<tablet_id>`**
-## Example
+> The ID of the specific tablet to display information for.
-1. list all tablets of the specified table
+## Return Value
- ```sql
- SHOW TABLETS FROM example_db.table_name;
- ```
+When using `SHOW TABLET <tablet_id>`, the following columns are returned:
-2. list all tablets of the specified partitions
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| PartitionName | String | The name of the partition that contains the
tablet. |
+| IndexName | String | The name of the index that contains the tablet.
|
+| DbId | Int | The ID of the database.
|
+| TableId | Int | The ID of the table.
|
+| PartitionId | Int | The ID of the partition.
|
+| IndexId | Int | The ID of the index.
|
+| IsSync | Boolean | Whether the tablet is in sync with its replicas.
|
+| Order | Int | The order of the tablet.
|
+| QueryHits | Int | The number of query hits on this tablet.
|
+| DetailCmd | String | The command to get more detailed information
about the tablet. |
- ```sql
- SHOW TABLETS FROM example_db.table_name PARTITIONS(p1, p2);
- ```
+## Access Control Requirements
-3. list all DECOMMISSION tablets on the specified backend
+The user executing this SQL command must have at least the following
privileges:
- ```sql
- SHOW TABLETS FROM example_db.table_name WHERE state="DECOMMISSION" AND
BackendId=11003;
- ```
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
-## Keywords
+## Examples
- SHOW, TABLETS
+Show details of a specific tablet:
-## Best Practice
+```sql
+SHOW TABLET 10145;
+```
+```text
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| DbName | TableName | PartitionName | IndexName | DbId | TableId |
PartitionId | IndexId | IsSync | Order | QueryHits | DetailCmd
|
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+| test | sell_user | sell_user | sell_user | 10103 | 10143 | 10142
| 10144 | true | 0 | 0 | SHOW PROC
'/dbs/10103/10143/partitions/10142/10144/10145'; |
++--------+-----------+---------------+-----------+-------+---------+-------------+---------+--------+-------+-----------+------------------------------------------------------------+
+```
diff --git
a/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
b/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
index 9b1b62c56fb..802360dc372 100644
---
a/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
+++
b/versioned_docs/version-3.0/sql-manual/sql-statements/table-and-view/data-and-status-management/SHOW-TABLETS-BELONG.md
@@ -25,41 +25,72 @@ under the License.
-->
-### Description
-Used to show tablets and information of their belonging table
+## Description
-grammar:
+This statement is used to show tablets and information of their belonging
table.
+
+## Syntax
```sql
-SHOW TABLETS BELONG tablet-ids;
+SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...;
```
-illustrate:
+## Required Parameters
+
+**1. `<tablet_id>`**
+
+> One or more tablet IDs, separated by commas. Duplicate IDs will be
deduplicated in the result.
+
+## Return Value
+
+When using `SHOW TABLETS BELONG <tablet_id> [, <tablet_id>]...`, the following
columns are returned:
+
+| Column | DataType | Note
|
+|---------------|----------|------------------------------------------------------------------------|
+| DbName | String | The name of the database that contains the
tablet. |
+| TableName | String | The name of the table that contains the tablet.
|
+| TableSize | String | The size of the table (e.g., "8.649 KB").
|
+| PartitionNum | Int | The number of partitions in the table.
|
+| BucketNum | Int | The number of buckets in the table.
|
+| ReplicaCount | Int | The number of replicas in the table.
|
+| TabletIds | Array | The list of tablet IDs that belong to the table.
|
-1. tablet-ids: one or more tablet-ids, with comma separated
-2. Columns of result keep same with result of `SHOW-DATA` for the same table
+## Access Control Requirements
-### Example
+The user executing this SQL command must have at least the following
privileges:
-1. show information of four tablet-ids (actually, three tablet-ids. Result
will be deduplicated)
+| Privilege | Object | Notes
|
+|:-----------|:---------|:---------------------------------------------------------------------------------------------------------------------------------|
+| Admin_priv | Database | Required to execute administrative operations on the
database, including managing tables, partitions, and system-level commands. |
- ```sql
- SHOW TABLETS BELONG 27028,78880,78382,27028;
- ```
+## Examples
- ```
+Show information about a specific tablet:
+
+```sql
+SHOW TABLETS BELONG 10145;
+```
+
+```text
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| DbName | TableName | TableSize | PartitionNum | BucketNum | ReplicaCount |
TabletIds |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+| test | sell_user | 8.649 KB | 1 | 4 | 4 |
[10145] |
++--------+-----------+-----------+--------------+-----------+--------------+-----------+
+```
+
+Show information about multiple tablets:
+
+```sql
+SHOW TABLETS BELONG 27028,78880,78382,27028;
+```
+
+```text
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| DbName | TableName | TableSize | PartitionNum | BucketNum |
ReplicaCount | TabletIds |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
| default_cluster:db1 | kec | 613.000 B | 379 | 604 | 604
| [78880, 78382] |
| default_cluster:db1 | test | 1.874 KB | 1 | 1 | 1
| [27028] |
+---------------------+-----------+-----------+--------------+-----------+--------------+----------------+
- ```
-
-### Keywords
-
- SHOW, TABLETS, BELONG
-
-### Best Practice
-
+```
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]