> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing information about async inserts. Each entry represents an insert query buffered into an async insert query.

# system.asynchronous_insert_log

<Info>
  **Querying in ClickHouse Cloud**

  The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/reference/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.
</Info>

<h2 id="description">
  Description
</h2>

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](/reference/settings/server-settings/settings#asynchronous_insert_log) section.

The flushing period of data is set in `flush_interval_milliseconds` parameter of the [asynchronous\_insert\_log](/reference/settings/server-settings/settings#asynchronous_insert_log) server settings section. To force flushing, use the [SYSTEM FLUSH LOGS](/reference/statements/system#flush-logs) query.

ClickHouse does not delete data from the table automatically. See [Introduction](/reference/system-tables/overview#system-tables-introduction) for more details.

<h2 id="columns">
  Columns
</h2>

* `hostname` ([LowCardinality(String)](/reference/data-types/lowcardinality)) — Hostname of the server executing the query.
* `event_date` ([Date](/reference/data-types/date)) — The date when the async insert happened.
* `event_time` ([DateTime](/reference/data-types/datetime)) — The date and time when the async insert finished execution.
* `event_time_microseconds` ([DateTime64(6)](/reference/data-types/datetime64)) — The date and time when the async insert finished execution with microseconds precision.
* `query` ([String](/reference/data-types/string)) — Query string.
* `database` ([LowCardinality(String)](/reference/data-types/lowcardinality)) — The name of the database the table is in.
* `table` ([LowCardinality(String)](/reference/data-types/lowcardinality)) — Table name.
* `format` ([LowCardinality(String)](/reference/data-types/lowcardinality)) — Format name.
* `query_id` ([String](/reference/data-types/string)) — ID of the initial query.
* `bytes` ([UInt64](/reference/data-types/int-uint)) — Number of inserted bytes.
* `rows` ([UInt64](/reference/data-types/int-uint)) — Number of inserted rows.
* `exception` ([String](/reference/data-types/string)) — Exception message.
* `status` ([Enum8('Ok' = 0, 'ParsingError' = 1, 'FlushError' = 2)](/reference/data-types/enum)) — 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)](/reference/data-types/enum)) — The status of the data. Value: 'Parsed' and 'Preprocessed'.
* `flush_time` ([DateTime](/reference/data-types/datetime)) — The date and time when the flush happened.
* `flush_time_microseconds` ([DateTime64(6)](/reference/data-types/datetime64)) — The date and time when the flush happened with microseconds precision.
* `flush_query_id` ([String](/reference/data-types/string)) — ID of the flush query.
* `timeout_milliseconds` ([UInt64](/reference/data-types/int-uint)) — The adaptive timeout calculated for this entry.

<h2 id="example">
  Example
</h2>

```sql title="Query" theme={null}
SELECT * FROM system.asynchronous_insert_log LIMIT 1 \G;
```

```text title="Response" theme={null}
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
```

<h2 id="see-also">
  See Also
</h2>

* [system.query\_log](/reference/system-tables/query_log) — Description of the `query_log` system table which contains common information about queries execution.
* [system.asynchronous\_inserts](/reference/system-tables/asynchronous_inserts) — This table contains information about pending asynchronous inserts in queue.
