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

# max_result_* 세션 설정

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

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="max_result_bytes">
  ## max\_result\_bytes
</div>

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

결과 크기를 바이트 단위(비압축)로 제한합니다. 임계값에 도달하면 쿼리는 데이터 블록 처리를 마친 후 중지되지만,
결과의 마지막 블록은 잘라내지 않으므로 결과 크기가 임계값보다 커질 수 있습니다.

**주의사항**

이 임계값을 계산할 때는 메모리 내 결과 크기도 함께 고려됩니다.
결과 크기 자체는 작더라도 메모리에서 더 큰 데이터 구조를 참조할 수 있으며,
여기에는 LowCardinality 컬럼의 딕셔너리와 AggregateFunction 컬럼의 Arena가 포함되므로,
결과 크기가 작아도 임계값을 초과할 수 있습니다.

<Warning>
  이 설정은 상당히 저수준이므로 주의해서 사용해야 합니다.
</Warning>

<div id="max_result_rows">
  ## max\_result\_rows
</div>

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

결과의 행 수를 제한합니다. 이 설정은 서브쿼리와 분산 쿼리의 일부를 실행하는 원격 서버에서도 확인됩니다.
값이 `0`이면 제한이 적용되지 않습니다.

임계값에 도달하면 현재 데이터 블록의 처리가 끝난 후 쿼리가 중지되지만
결과의 마지막 블록은 잘라내지 않으므로 결과 크기가
임계값보다 클 수 있습니다.
