---
title: "Monitoring Asynchronous Inserts"
description: "ClickHouse asynchronous inserts can be monitored with SQL over system tables (query_log, asynchronous_insert_log, part_log, parts, and the PendingAsyncInsert metric), packaged as parameterized views for part creations, buffer flushes, flush errors and pending flushes."
url: "https://swe.quest/articles/monitoring-asynchronous-inserts-f9474fee5c98ea90"
canonical: "https://clickhouse.com/blog/monitoring-asynchronous-data-inserts-in-clickhouse"
source: "ClickHouse"
published: "2024-01-04"
difficulty: "medium"
kind: "How-to"
reading_minutes: 9
tags: ["observability","analytics","databases","sql"]
---

# Monitoring Asynchronous Inserts

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2024-01-04, 9 min read, How-to. Original: [https://clickhouse.com/blog/monitoring-asynchronous-data-inserts-in-clickhouse](https://clickhouse.com/blog/monitoring-asynchronous-data-inserts-in-clickhouse)

## Summary

ClickHouse asynchronous inserts can be monitored with SQL over system tables (query\_log, asynchronous\_insert\_log, part\_log, parts, and the PendingAsyncInsert metric), packaged as parameterized views for part creations, buffer flushes, flush errors and pending flushes. The flush-error view matters most in fire-and-forget mode, where failed buffer flushes are never reported back to the client. Worked scenarios show how flush and part frequency diverge from the configured threshold. Each node keeps a separate buffer per insert query shape and per settings set, and a partitioned table gets at least one part per partition key value in each flush.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- ClickHouse MergeTree parts ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- asynchronous inserts in ClickHouse ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

ClickHouse, asynchronous inserts, system.asynchronous\_insert\_log, system.part\_log, clusterAllReplicas, ClickHouse Cloud

## Related posts

- [Essential Monitoring Queries - part 1 - INSERT Queries](https://swe.quest/articles/essential-monitoring-queries-part-1-insert-queries-eda633e3819dfbe1.md): ClickHouse · 2022-12-28 · Medium · 10 min read · Analytics & OLAP, Observability, SQL
  ClickHouse system tables such as part\_log, query\_log, asynchronous\_insert\_log, asynchronous\_metric\_log and parts can be queried with SQL to monitor and troubleshoot INSERT workloads.
- [Asynchronous Data Inserts in ClickHouse](https://swe.quest/articles/asynchronous-data-inserts-in-clickhouse-7e5b81fdcf244f48.md): ClickHouse · 2023-08-01 · Medium · 19 min read · Analytics & OLAP, Storage engines, Performance engineering, Observability
  ClickHouse asynchronous inserts move batching from the client to the server.
- [ClickHouse v21.11 Released](https://swe.quest/articles/clickhouse-v21-11-released-1011a7b63db415f6.md): ClickHouse · 2021-11-11 · Medium · 4 min read · Analytics & OLAP, Databases
  ClickHouse 21.11 adds asynchronous inserts, which buffer many small concurrent INSERTs server-side and flush them as a single batch.
- [Building a Unified Data Platform with ClickHouse](https://swe.quest/articles/building-a-unified-data-platform-with-clickhouse-cc8bf54cebee136c.md): ClickHouse · 2023-07-28 · Medium · 10 min read · Analytics & OLAP, Databases, Data pipelines, Performance engineering, Go
  Synq, a data observability startup, consolidated its user-facing application, internal BI, in-app analytics and ML training data onto a single ClickHouse Cloud cluster after Postgres with a time-series plugin struggled with large backfills.
- [System Tables and a Window into the Internals of ClickHouse](https://swe.quest/articles/system-tables-and-a-window-into-the-internals-of-clickhouse-4ad666c7ab1a3be7.md): ClickHouse · 2022-12-21 · Medium · 13 min read · Analytics & OLAP, Observability, Debugging, SQL
  ClickHouse system tables are read-only virtual tables in the system database that expose server state, settings, metrics, errors, parts and query history.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
