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

# materialize_statistics_on_insert_* 세션 설정

> materialize_statistics_on_insert_* 생성 그룹에 속한 ClickHouse 세션 설정입니다.

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["버전", "기본값", "설명"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        버전 이력
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

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
  }}>유형</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>기본값</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          재시작 없이 변경 가능
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

이 설정은 [system.settings](/ko/reference/system-tables/settings)에서 확인할 수 있으며, [소스](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp)를 기반으로 자동 생성됩니다.

<div id="materialize_statistics_on_insert">
  ## materialize\_statistics\_on\_insert
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.8"},{"label": "1"},{"label": "`materialize_statistics_on_insert_max_table_size` 미만의 테이블에서는 기본적으로 INSERT 시 컬럼 통계를 구체화하여, 새로 로드된 차원 테이블에서 비용 기반 조인 재정렬이 정확한 추정치를 사용할 수 있도록 합니다."}]}, {"id": "row-2","items": [{"label": "26.4"},{"label": "0"},{"label": "기본적으로 INSERT 시 통계 생성을 비활성화하고, 대신 머지에 의존합니다"}]}, {"id": "row-3","items": [{"label": "24.6"},{"label": "1"},{"label": "삽입 시 통계 구체화를 비활성화할 수 있는 새로운 설정을 추가했습니다"}]}]} />

활성화하면 새로 삽입된 파트에 대해 통계를 생성하고 구체화합니다. 비활성화해도 통계는 여전히 머지 중 또는 명시적인 MATERIALIZE STATISTICS를 통해 생성되고 저장됩니다. 현재 테이블 크기와 기록 중인 블록 크기의 합이 `materialize_statistics_on_insert_max_table_size`를 초과하지 않는 테이블에만 적용됩니다.

<div id="materialize_statistics_on_insert_max_table_size">
  ## materialize\_statistics\_on\_insert\_max\_table\_size
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.8"},{"label": "26843545600"},{"label": "새 설정입니다."}]}]} />

현재 크기와 기록 중인 블록의 합이 이 값을 초과하지 않는 테이블에서 새로 삽입된 파트에 대해서만 컬럼 통계를 생성하고 저장합니다(`materialize_statistics_on_insert` 참조). `0`은 크기 제한이 없음을 의미합니다.
