sys.log_unload
This system view captures information about completed unload (ybunload
) operations.
Column Name | Data Type | Description |
---|---|---|
session_key | text | Unique authentication key for the ybunload operation. This is different from the session ID, which is the ID tracked for the user session in the sys.session and sys.log_session views. |
state | text | State of the unload operation, such as STARTING , DONE , or ERROR . |
error_string | text | Error message for a failed unload. |
database_id | bigint | Unique ID of the database that contains the data being unloaded. |
user_id | bigint | Unique ID of the user who ran the ybunload command. |
session_id | bigint | Session ID; foreign key to the sys.session and sys.log_session views. |
database_name | text | Name of the database that the data belongs to. |
username | text | Name of the user who ran the ybunload command. |
client_hostname | text | Host name of the client system where the unload was started. |
client_username | text | Client OS user running the ybunload command. |
start_time | timestamptz | When the ybunload command started running. |
end_time | timestamptz | When the ybunload command completed its execution. (The sys.unload view has a last_activity_time column instead.) |
elapsed_ms | bigint | Duration of the unload, in milliseconds. |
sql_query | text | The SELECT statement that was run to unload data. |
sent_rows | bigint | Number of rows transferred over the network during the unload. |
sent_bytes | bigint | Number of bytes transferred over the network during the unload. |
sent_rows_per_second | double precision | Number of rows transferred per second during the unload. |
sent_bytes_per_second | double precision | Number of bytes transferred per second during the unload. |
Example
The following example tracks the progress of an unload every 2 seconds:
premdb=# select * from sys.unload where start_time>'2018-05-02 18:00:00-07';
(0 rows)
premdb=# \watch
(0 rows)
Watch every 2s Wed May 2 18:00:13 2018
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | CDil7ZNCMkZDvlgSPiHZn7qR4Wv7KLkXM3DLpIIMYXd6arJT0L0OFBDKPBNSaojf
state | RUNNING
error_string | [NULL]
database_id | 16423
user_id | 16434
session_id | 16792
database_name | premdb
username | bobr
client_hostname | localhost
client_username | yb100
start_time | 2018-05-02 18:00:11-07
last_activity_time | 2018-05-02 18:00:11-07
elapsed_ms | 1860
sql_query | select * from "newmatchstats"
sent_rows | 0
sent_bytes | 0
sent_rows_per_second | 0
sent_bytes_per_second | 0
Watch every 2s Wed May 2 18:00:15 2018
...
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | CDil7ZNCMkZDvlgSPiHZn7qR4Wv7KLkXM3DLpIIMYXd6arJT0L0OFBDKPBNSaojf
state | COMPLETE
error_string | [NULL]
database_id | 16423
user_id | 16434
session_id | 16792
database_name | premdb
username | bobr
client_hostname | localhost
client_username | yb100
start_time | 2018-05-02 18:00:11-07
last_activity_time | 2018-05-02 18:00:21-07
elapsed_ms | 9851
sql_query | select * from "newmatchstats"
sent_rows | 25990128
sent_bytes | 659797740
sent_rows_per_second | 2599012.8
sent_bytes_per_second | 65979774
...
Watch every 2s Wed May 2 18:00:23 2018
...
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | CDil7ZNCMkZDvlgSPiHZn7qR4Wv7KLkXM3DLpIIMYXd6arJT0L0OFBDKPBNSaojf
state | DONE
error_string | [NULL]
database_id | 16423
user_id | 16434
session_id | 16792
database_name | premdb
username | bobr
client_hostname | localhost
client_username | yb100
start_time | 2018-05-02 18:00:11-07
last_activity_time | 2018-05-02 18:00:21-07
elapsed_ms | 10353
sql_query | select * from "newmatchstats"
sent_rows | 25990128
sent_bytes | 659797740
sent_rows_per_second | 2599012.8
sent_bytes_per_second | 65979774
...
Parent topic:System Views