Files
doris/docs/en/sql-reference/sql-statements/Data Manipulation/SHOW TABLETS.md
ChPi f57f02bbf2 [improvement] Support show tablets stmt (#7970)
change `show tablet from tbl` to `show tablets from tbl`
2022-03-05 15:25:57 +08:00

2.0 KiB

title, language
title language
SHOW TABLETS en

SHOW TABLETS

Description

This statement is used to display tablet-related information (for administrators only)
Grammar:
    SHOW TABLETS
    [FROM [db_name.]table_name] [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]

example

    // Display all tablets information in the specified table below the specified DB
    SHOW TABLETS FROM example_db.table_name;
    
    SHOW TABLETS FROM example_db.table_name partition(p1, p2);
    
    // display 10 tablets information in the table
    SHOW TABLETS FROM example_db.table_name limit 10;
    
    SHOW TABLETS FROM example_db.table_name limit 5,10;
    
    // display the tablets that fulfill some conditions
    SHOW TABLETS FROM example_db.table_name where backendid=10000 and version=1 and state="NORMAL";
    
    SHOW TABLETS FROM example_db.table_name where backendid=10000 order by version;

    SHOW TABLETS FROM example_db.table_name where indexname="t1_rollup";

keyword

SHOW,TABLETS,LIMIT