Note
This view was introduced in OceanBase Database V4.3.3.
Purpose
The oceanbase.DBA_OB_TEMP_FILES view displays the information about temporary files.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| FILE_ID | bigint(20) | NO | The file ID of the temporary file. |
| TRACE_ID | varchar(64) | NO | The trace ID in the current environment when the temporary file was opened. |
| DIR_ID | bigint(20) | NO | The directory ID corresponding to the temporary file. |
| BYTES | bigint(20) | NO | The data size of the temporary file, in bytes. |
| START_OFFSET | bigint(20) | NO | The start byte offset of the temporary file, which indicates the start position of the current valid data. |
| TOTAL_WRITES | bigint(20) | NO | The total number of write requests to the temporary file. |
| UNALIGNED_WRITES | bigint(20) | NO | The total number of unaligned write requests to the temporary file. |
| TOTAL_READS | bigint(20) | NO | The total number of read requests to the temporary file. |
| UNALIGNED_READS | bigint(20) | NO | The total number of unaligned read requests to the temporary file. |
| TOTAL_READ_BYTES | bigint(20) | NO | The total size of read requests to the temporary file, in bytes. |
| LAST_ACCESS_TIME | timestamp(6) | NO | The time when the temporary file was last accessed. |
| LAST_MODIFY_TIME | timestamp(6) | NO | The time when the temporary file was last modified. |
| BIRTH_TIME | timestamp(6) | NO | The time when the temporary file was created. |
Sample query
Query information about temporary files.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_TEMP_FILES LIMIT=1 \G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
FILE_ID: 51
TRACE_ID: YBXXXXXXXX-000XXXXXXXXXXX-0-0
DIR_ID: 1283408
BYTES: 13185612
START_OFFSET: 0
TOTAL_WRITES: 239
UNALIGNED_WRITES: 239
TOTAL_READS: 0
UNALIGNED_READS: 0
TOTAL_READ_BYTES: 0
LAST_ACCESS_TIME: 2024-09-20 14:32:18.268516
LAST_MODIFY_TIME: 2024-09-20 14:32:27.314467
BIRTH_TIME: 2024-09-20 14:32:18.268516