## 11.6 M\_LOG\_SEGMENTS System View
Provides log segment statistics.
## Structure
| Column name   | Data type    | Unit   | Description                               |
|---------------|--------------|--------|-------------------------------------------|
| HOST          | VARCHAR(64)  |        | Host name                                 |
| PORT          | INTEGER      |        | Internal port                             |
| VOLUME_ID     | INTEGER      |        | Persistence Volume ID                     |
| PARTITION_ID  | BIGINT       |        | Log partition ID                          |
| SEGMENT_ID    | BIGINT       |        | Log segment ID within parti­ tion          |
| FILE_NAME     | VARCHAR(512) |        | Log segment file name                     |
| FILE_OFFSET   | BIGINT       | Byte   | Start position of log segment in the file |
| Column name   | Data type   | Unit   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|---------------|-------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| STATE         | VARCHAR(16) |        | Log segment state. Possible values are: ● Formatting - The log segment is being for­ matted and not yet used. ● Preallocated - The log segment has been preal­ located, but never used. ● Writing - The log seg­ ment is currently being written. ● Closed - The log seg­ ment is closed, not backed up and is still re­ quired for restart. ● Truncated - The log seg­ ment is not required for restart, but has not been backed up. ● BackedUp - The log seg­ ment has been backed up, but is still required for restart. ● RetainedFree - The log segment has been backed up and is not re­ quired for restart, but is required to resync the system replication sites. ● Free - The log segment has been backed up, it is not required for restart and can be reused. |
| MIN_POSITION  | BIGINT      |        | First position contained in this log segment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| MAX_POSITION  | BIGINT      |        | Position behind the last log record in this log segment (closed log segments only)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| HOLE_POSITION | BIGINT      |        | Start position of the log hole before this log segment (equal to min position if no hole)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Column name           | Data type   | Unit   | Description                                       |
|-----------------------|-------------|--------|---------------------------------------------------|
| USED_SIZE             | BIGINT      | Byte   | Used log segment size in bytes                    |
| TOTAL_SIZE            | BIGINT      | Byte   | Total log segment size in bytes                   |
| IN_BACKUP             | VARCHAR(5)  |        | Flag for log segment in backup: TRUE, FALSE       |
| ENCRYPTION_KEY_HASH   | VARCHAR(64) |        | Hash of key used for log seg­ ment encryption      |
| LAST_COMMIT_TIMESTAMP | TIMESTAMP   |        | Timestamp of the last com­ mit in this log segment |
## Additional Information description
This view describes each allocated log segment and shows its current state and log position range that is currently contained in the segment.
This view has a resettable counterpart; you can see the values since the last reset in the M\_LOG\_SEGMENTS\_RESET system view. To reset the view, execute the following statement: ALTER SYSTEM RESET MONITORING VIEW SYS.M\_LOG\_SEGMENTS\_RESET; .
## Related Information
M\_LOG\_SEGMENTS\_RESET System View M\_LOG\_BUFFERS System View M\_LOG\_PARTITIONS System View M\_VOLUME\_IO\_TOTAL\_STATISTICS System View