mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
4.0 KiB
4.0 KiB
slug |
---|
/en/operations/system-tables/asynchronous_insert_log |
asynchronous_insert_log
Contains information about async inserts. Each entry represents an insert query buffered into an async insert query.
To start logging configure parameters in the asynchronous_insert_log section.
The flushing period of data is set in flush_interval_milliseconds
parameter of the asynchronous_insert_log server settings section. To force flushing, use the SYSTEM FLUSH LOGS query.
ClickHouse does not delete data from the table automatically. See Introduction for more details.
Columns:
hostname
(LowCardinality(String)) — Hostname of the server executing the query.event_date
(Date) — The date when the async insert happened.event_time
(DateTime) — The date and time when the async insert finished execution.event_time_microseconds
(DateTime64) — The date and time when the async insert finished execution with microseconds precision.query
(String) — Query string.database
(String) — The name of the database the table is in.table
(String) — Table name.format
(String) — Format name.query_id
(String) — ID of the initial query.bytes
(UInt64) — Number of inserted bytes.exception
(String) — Exception message.status
(Enum8) — Status of the view. Values:'Ok' = 1
— Successful insert.'ParsingError' = 2
— Exception when parsing the data.'FlushError' = 3
— Exception when flushing the data.
flush_time
(DateTime) — The date and time when the flush happened.flush_time_microseconds
(DateTime64) — The date and time when the flush happened with microseconds precision.flush_query_id
(String) — ID of the flush query.
Example
Query:
SELECT * FROM system.asynchronous_insert_log LIMIT 1 \G;
Result:
hostname: clickhouse.eu-central1.internal
event_date: 2023-06-08
event_time: 2023-06-08 10:08:53
event_time_microseconds: 2023-06-08 10:08:53.199516
query: INSERT INTO public.data_guess (user_id, datasource_id, timestamp, path, type, num, str) FORMAT CSV
database: public
table: data_guess
format: CSV
query_id: b46cd4c4-0269-4d0b-99f5-d27668c6102e
bytes: 133223
exception:
status: Ok
flush_time: 2023-06-08 10:08:55
flush_time_microseconds: 2023-06-08 10:08:55.139676
flush_query_id: cd2c1e43-83f5-49dc-92e4-2fbc7f8d3716
See Also
- system.query_log — Description of the
query_log
system table which contains common information about queries execution. - system.asynchronous_inserts — This table contains information about pending asynchronous inserts in queue.