Note
This view was introduced in V4.2.0.
Description
You can access this view only in a sys tenant. It displays all the log streams that have existed in all tenants.
Fields
| Field | Type | Not null | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| LS_ID | bigint(20) | NO | The log stream ID. |
| LS_GROUP_ID | bigint(20) | NO | The log stream group ID. |
| STATUS | varchar(100) | NO | The current status of the log stream. The following statuses are possible:
|
| FLAG | varchar(2048) | NO | The log stream flags. The following flags are possible:
|
| CREATE_SCN | decimal(20,0) | NO | The GTS when the log stream is created. The unit is nanoseconds. |
Examples
In a sys tenant, query all the log streams that have existed in all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_LS_HISTORY;
The query result is as follows:
+-----------+-------+-------------+--------+------+---------------------+
| TENANT_ID | LS_ID | LS_GROUP_ID | STATUS | FLAG | CREATE_SCN |
+-----------+-------+-------------+--------+------+---------------------+
| 1 | 1 | 0 | NORMAL | | 0 |
| 1001 | 1 | 0 | NORMAL | | 0 |
| 1002 | 1 | 0 | NORMAL | | 0 |
| 1002 | 1001 | 1001 | NORMAL | | 1736152420990131001 |
| 1003 | 1 | 0 | NORMAL | | 0 |
| 1004 | 1 | 0 | NORMAL | | 0 |
| 1004 | 1001 | 1001 | NORMAL | | 1736152507462028000 |
| 1009 | 1 | 0 | NORMAL | | 0 |
| 1010 | 1 | 0 | NORMAL | | 0 |
| 1010 | 1001 | 1001 | NORMAL | | 1736315563386701001 |
| 1015 | 1 | 0 | NORMAL | | 0 |
| 1016 | 1 | 0 | NORMAL | | 0 |
| 1016 | 1001 | 1001 | NORMAL | | 1736152420990131001 |
+-----------+-------+-------------+--------+------+---------------------+
13 rows in set