Description
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.
It is safe to truncate or drop this table at any time.
Columns
hostname(LowCardinality(String)) — Hostname of the server executing the query.clickhouse_version(LowCardinality(String)) — Version of the ClickHouse server that produced the row.system_processor(LowCardinality(String)) — CPU architecture of the ClickHouse server that produced the row.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(6)) — The date and time when the async insert finished execution with microseconds precision.query(String) — Query string.database(LowCardinality(String)) — The name of the database the table is in.table(LowCardinality(String)) — Table name.format(LowCardinality(String)) — Format name.query_id(String) — ID of the initial query.bytes(UInt64) — Number of inserted bytes.rows(UInt64) — Number of inserted rows.exception(String) — Exception message.status(Enum8(‘Ok’ = 0, ‘ParsingError’ = 1, ‘FlushError’ = 2)) — Status of the insert. Values: ‘Ok’ = 0 — Successful insert, ‘ParsingError’ = 1 — Exception when parsing the data, ‘FlushError’ = 2 — Exception when flushing the data.data_kind(Enum8(‘Parsed’ = 0, ‘Preprocessed’ = 1)) — The status of the data. Value: ‘Parsed’ and ‘Preprocessed’.flush_time(DateTime) — The date and time when the flush happened.flush_time_microseconds(DateTime64(6)) — The date and time when the flush happened with microseconds precision.flush_query_id(String) — ID of the flush query.timeout_milliseconds(UInt64) — The adaptive timeout calculated for this entry.
Examples
SELECT * FROM system.asynchronous_insert_log LIMIT 1 \G;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-2fbc7f8d3716See also
- system.query_log — Description of the
query_logsystem table which contains common information about queries execution. - system.asynchronous_inserts — This table contains information about pending asynchronous inserts in queue.