oceanbase.CDB_OB_TABLET_TO_LS

2026-02-05 05:53:37  Updated

Note

This view is available starting with V4.0.0.

Purpose

This view displays the list of tablets and the log stream information of all tenants under the sys tenant.

Columns

Column Type Nullable? Description
TENANT_ID bigint(20) NO The tenant ID.
TABLET_ID bigint(20) NO The tablet ID.
LS_ID bigint(1) NO The log stream ID of the tablet.

Sample query

Query the tablet list of log stream 1001 of tenant 1002 under the sys tenant, and display the first five rows of the query result.

obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_TABLET_TO_LS WHERE TENANT_ID=1002 AND LS_ID=1001 LIMIT 5;

The query result is as follows:

+-----------+-----------+-------+
| TENANT_ID | TABLET_ID | LS_ID |
+-----------+-----------+-------+
|      1002 |    200004 |  1001 |
|      1002 |    200005 |  1001 |
|      1002 |    200007 |  1001 |
|      1002 |    200008 |  1001 |
|      1002 |    200009 |  1001 |
+-----------+-----------+-------+
5 rows in set

Contact Us