Note
This view was introduced in V4.2.0.
Description
This view is available only in the sys tenant and displays all the log streams that have existed in all tenants.
Columns
Column |
Type |
NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| LS_ID | bigint(20) | NO | Log stream ID |
| LS_GROUP_ID | bigint(20) | NO | Log stream group ID |
| STATUS | varchar(100) | NO | The current status of the log stream. The following statuses are possible:
|
| FLAG | varchar(2048) | NO | Log stream flags. The following flags are possible:
|
| CREATE_SCN | decimal(20,0) | NO | The GTS when the log stream is created. The value is in nanoseconds. |
Examples
In the following example, the sys tenant queries 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
