title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/asynchronous_insert_log.md)

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](/docs/operations/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.

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](/docs/operations/server-configuration-parameters/settings#asynchronous_insert_log) section.

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

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

Columns:

- `hostname` ([LowCardinality(String)](/docs/sql-reference/data-types/string)) — Hostname of the server executing the query.
- `event_date` ([Date](/docs/sql-reference/data-types/date)) — The date when the async insert happened.
- `event_time` ([DateTime](/docs/sql-reference/data-types/datetime)) — The date and time when the async insert finished execution.
- `event_time_microseconds` ([DateTime64](/docs/sql-reference/data-types/datetime64)) — The date and time when the async insert finished execution with microseconds precision.
- `query` ([String](/docs/sql-reference/data-types/string)) — Query string.
- `database` ([String](/docs/sql-reference/data-types/string)) — The name of the database the table is in.
- `table` ([String](/docs/sql-reference/data-types/string)) — Table name.
- `format` ([String](/docs/sql-reference/data-types/string)) — Format name.
- `query_id` ([String](/docs/sql-reference/data-types/string)) — ID of the initial query.
- `bytes` ([UInt64](/docs/sql-reference/data-types/int-uint#integer-ranges)) — Number of inserted bytes.
- `exception` ([String](/docs/sql-reference/data-types/string)) — Exception message.
- `status` ([Enum8](/docs/sql-reference/data-types/enum)) — 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](/docs/sql-reference/data-types/datetime)) — The date and time when the flush happened.
- `flush_time_microseconds` ([DateTime64](/docs/sql-reference/data-types/datetime64)) — The date and time when the flush happened with microseconds precision.
- `flush_query_id` ([String](/docs/sql-reference/data-types/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](/docs/operations/system-tables/query_log) — Description of the `query_log` system table which contains common information about queries execution.
- [system.asynchronous\_inserts](/docs/operations/system-tables/asynchronous_inserts) — This table contains information about pending asynchronous inserts in queue.

Was this page helpful?