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

# shrink_over_* 세션 설정

> shrink_over_* 생성 그룹에 속하는 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](/docs/ko/reference/system-tables/settings)에서 확인할 수 있으며, [소스](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp)로부터 자동 생성됩니다.

<div id="shrink_over_allocated_columns_min_waste_bytes">
  ## shrink\_over\_allocated\_columns\_min\_waste\_bytes
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.8"},{"label": "16777216"},{"label": "새로운 설정: INSERT 시 컬럼을 실제 크기에 맞게 축소하기 위한 컬럼의 최소 절대 낭비 메모리입니다."}]}]} />

INSERT 시 실제 크기에 맞게 축소하기 위해 필요한 컬럼의 낭비된(예약되었지만 사용되지 않은) 메모리 최소 절대량(바이트)입니다. [shrink\_over\_allocated\_columns\_min\_waste\_ratio](/docs/ko/reference/settings/session-settings/shrink-over#shrink_over_allocated_columns_min_waste_ratio)를 참조하십시오.

메모리 절감 효과가 재할당 비용을 상쇄하지 못하는, 초과 할당량이 작은 컬럼의 재할당을 방지합니다.

<div id="shrink_over_allocated_columns_min_waste_ratio">
  ## shrink\_over\_allocated\_columns\_min\_waste\_ratio
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.8"},{"label": "1"},{"label": "최대 메모리 사용량을 줄이기 위해 INSERT 시 과다 할당된 컬럼을 실제 크기에 맞게 축소하는 새로운 설정입니다. 기본적으로 비활성화되어 있습니다(1.0)."}]}]} />

INSERT 시 과다 할당된 컬럼(예약된 메모리가 사용 중인 메모리를 초과하는 컬럼으로, 예를 들어 가변 길이 컬럼이 2의 거듭제곱 단위로 증가할 때 발생)은 최대 메모리 사용량을 줄이기 위해 비용이 큰 머티리얼라이즈 및 파트 쓰기 단계 전에 실제 크기에 맞게 축소됩니다.

컬럼은 `allocatedBytes() > byteSize() * shrink_over_allocated_columns_min_waste_ratio`이고 절대 낭비량이 `shrink_over_allocated_columns_min_waste_bytes` 이상인 경우에만 축소됩니다.

가능한 값:

* 1보다 큰 Float입니다.
* 1 이하의 값은 축소를 비활성화합니다(기본값 `1.0`은 비활성화 상태를 유지합니다).
