> ## 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.

# min_insert_* session settings

> ClickHouse session settings in the min_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="min_insert_block_size_bytes">
  min\_insert\_block\_size\_bytes
</h2>

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

The minimum size of blocks (in bytes) to form for insertion into a table.

This setting works together with min\_insert\_block\_size\_rows and controls block formation in the same contexts (format parsing and INSERT operations). See min\_insert\_block\_size\_rows for detailed information about when and how these settings are applied.

Possible values:

* Positive integer.
* 0 — setting does not participate in block formation.

<h2 id="min_insert_block_size_bytes_for_materialized_views">
  min\_insert\_block\_size\_bytes\_for\_materialized\_views
</h2>

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

Sets the minimum number of bytes in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](/docs/reference/statements/create/view). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage.

Possible values:

* Any positive integer.
* 0 — Squashing disabled.

**See also**

* [min\_insert\_block\_size\_bytes](/docs/reference/settings/session-settings/min-insert#min_insert_block_size_bytes)

<h2 id="min_insert_block_size_rows">
  min\_insert\_block\_size\_rows
</h2>

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

The minimum size of blocks (in rows) to form for insertion into a table.

This setting controls block formation in two contexts:

1. Format parsing: When the server parses row-based input formats (CSV, TSV, JSONEachRow, etc.) from any interface (HTTP, clickhouse-client with inline data, gRPC, PostgreSQL wire protocol), blocks are emitted when:

   * Both min\_insert\_block\_size\_rows AND min\_insert\_block\_size\_bytes are reached, OR
   * Either max\_insert\_block\_size\_rows OR max\_insert\_block\_size\_bytes is reached

   Note: When using clickhouse-client or clickhouse-local to read from a file, the client itself parses the data and this setting applies on the client side.

2. INSERT operations: During INSERT queries and when data flows through materialized views, this setting's behavior depends on `use_strict_insert_block_limits`:

   * When enabled: Blocks are emitted when:
     * Min thresholds (AND): Both min\_insert\_block\_size\_rows AND min\_insert\_block\_size\_bytes are reached
     * Max thresholds (OR): Either max\_insert\_block\_size\_rows OR max\_insert\_block\_size\_bytes is reached

   * When disabled (default): Blocks are emitted when min\_insert\_block\_size\_rows OR min\_insert\_block\_size\_bytes is reached. The max\_insert\_block\_size settings are not enforced.

Possible values:

* Positive integer.
* 0 — setting does not participate in block formation.

<h2 id="min_insert_block_size_rows_for_materialized_views">
  min\_insert\_block\_size\_rows\_for\_materialized\_views
</h2>

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

Sets the minimum number of rows in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](/docs/reference/statements/create/view). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage.

Possible values:

* Any positive integer.
* 0 — Squashing disabled.

**See Also**

* [min\_insert\_block\_size\_rows](/docs/reference/settings/session-settings/min-insert#min_insert_block_size_rows)
