> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# async_insert_* session settings

> ClickHouse session settings in the async_insert_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

These settings are available in [system.settings](/docs/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<h2 id="async_insert">
  async\_insert
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.2"},{"label": "1"},{"label": "Enable async inserts by default."}]}]} />

If true, data from INSERT query is stored in queue and later flushed to table in background. If wait\_for\_async\_insert is false, INSERT query is processed almost instantly, otherwise client will wait until data will be flushed to table

<h2 id="async_insert_busy_timeout_decrease_rate">
  async\_insert\_busy\_timeout\_decrease\_rate
</h2>

<SettingsInfoBlock type="Double" default_value="0.2" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "0.2"},{"label": "The exponential growth rate at which the adaptive asynchronous insert timeout decreases"}]}]} />

The exponential growth rate at which the adaptive asynchronous insert timeout decreases

<h2 id="async_insert_busy_timeout_increase_rate">
  async\_insert\_busy\_timeout\_increase\_rate
</h2>

<SettingsInfoBlock type="Double" default_value="0.2" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "0.2"},{"label": "The exponential growth rate at which the adaptive asynchronous insert timeout increases"}]}]} />

The exponential growth rate at which the adaptive asynchronous insert timeout increases

<h2 id="async_insert_busy_timeout_max_ms">
  async\_insert\_busy\_timeout\_max\_ms
</h2>

**Aliases**: `async_insert_busy_timeout_ms`

<SettingsInfoBlock type="Milliseconds" default_value="200" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "200"},{"label": "The minimum value of the asynchronous insert timeout in milliseconds; async_insert_busy_timeout_ms is aliased to async_insert_busy_timeout_max_ms"}]}]} />

Maximum time to wait before dumping collected data per query since the first data appeared.

Cloud default value: `1000` (1s).

<h2 id="async_insert_busy_timeout_min_ms">
  async\_insert\_busy\_timeout\_min\_ms
</h2>

<SettingsInfoBlock type="Milliseconds" default_value="50" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "50"},{"label": "The minimum value of the asynchronous insert timeout in milliseconds; it also serves as the initial value, which may be increased later by the adaptive algorithm"}]}]} />

If auto-adjusting is enabled through async\_insert\_use\_adaptive\_busy\_timeout, minimum time to wait before dumping collected data per query since the first data appeared. It also serves as the initial value for the adaptive algorithm

<h2 id="async_insert_deduplicate">
  async\_insert\_deduplicate
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

For async INSERT queries in the replicated table, specifies that deduplication of inserting blocks should be performed

<h2 id="async_insert_max_data_size">
  async\_insert\_max\_data\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="10485760" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "10485760"},{"label": "The previous value appeared to be too small."}]}]} />

Maximum size in bytes of unparsed data collected per query before being inserted

Cloud default value: `104857600` (100 MiB).

<h2 id="async_insert_max_query_number">
  async\_insert\_max\_query\_number
</h2>

<SettingsInfoBlock type="UInt64" default_value="450" />

Maximum number of insert queries before being inserted.
Only takes effect if setting [`async_insert_deduplicate`](/docs/reference/settings/session-settings/async-insert#async_insert_deduplicate) is 1.

<h2 id="async_insert_poll_timeout_ms">
  async\_insert\_poll\_timeout\_ms
</h2>

<SettingsInfoBlock type="Milliseconds" default_value="10" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "10"},{"label": "Timeout in milliseconds for polling data from asynchronous insert queue"}]}]} />

Timeout for polling data from asynchronous insert queue

<h2 id="async_insert_use_adaptive_busy_timeout">
  async\_insert\_use\_adaptive\_busy\_timeout
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "1"},{"label": "Use adaptive asynchronous insert timeout"}]}]} />

If it is set to true, use adaptive busy timeout for asynchronous inserts
