kangpinghuang commented on a change in pull request #1687: add limit to show 
tablet(#1547)
URL: https://github.com/apache/incubator-doris/pull/1687#discussion_r318354371
 
 

 ##########
 File path: docs/documentation/cn/sql-reference/sql-statements/Data 
Manipulation/SHOW TABLET.md
 ##########
 @@ -3,15 +3,39 @@
     该语句用于显示 tablet 相关的信息(仅管理员使用)
     语法:
         SHOW TABLET
-        [FROM [db_name.]table_name | tablet_id]
+        [FROM [db_name.]table_name | tablet_id] [partiton(partition_name_1, 
partition_name_1)]
+        [where [version=1] [and backendid=10000] [and 
state="NORMAL|ROLLUP|CLONE|DECOMMISSION"]]
+        [order by order_column]
+        [limit [offset,]size]
+
+    现在show tablet命令支持按照按照以下字段进行过滤:partition, index name, version, backendid,
+    state,同时支持按照任意字段进行排序,并且提供limit限制返回条数。
 
 ## example
     1. 显示指定 db 的下指定表所有 tablet 信息
         SHOW TABLET FROM example_db.table_name;
+
+        // 获取partition p1和p2的tablet信息
+        SHOW TABLET FROM example_db.table_name partition(p1, p2);
+
+        // 获取10个结果
+        SHOW TABLET FROM example_db.table_name limit 10;
+
+        // 从偏移5开始获取10个结果
+        SHOW TABLET FROM example_db.table_name limit 5,10;
+
+        // 按照backendid/version/state字段进行过滤
+        SHOW TABLET FROM example_db.table_name where backendid=10000 and 
version=1 and state="NORMAL";
+
+        // 按照version字段进行排序
+        SHOW TABLET FROM example_db.table_name where backendid=10000 order by 
version;
+
+        // 获取index名字为t1_rollup的tablet相关信息
+        SHOW TABLET FROM example_db.table_name where indexname="t1_rollup";
 
 Review comment:
   I hava added in the cn doc

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to