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

# max_rand_* 세션 설정

> max_rand_* 그룹에 속하는 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="max_rand_distribution_parameter">
  ## max\_rand\_distribution\_parameter
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.4"},{"label": "1000000"},{"label": "극단적인 입력값으로 인한 중단을 방지하기 위해 난수 분포 함수의 shape 매개변수를 제한하는 새로운 설정입니다."}]}]} />

`randChiSquared`, `randStudentT`, `randFisherF`와 같은 난수 분포 함수에서 분포의 shape 매개변수에 허용되는 최댓값입니다. 극단적인 매개변수 값으로 인해 계산 시간이 과도하게 길어지는 현상을 방지합니다. `0`은 제한을 비활성화합니다. 샘플러가 전혀 종료되지 않는 값은 계속 거부됩니다.

<div id="max_rand_distribution_trials">
  ## max\_rand\_distribution\_trials
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.4"},{"label": "1000000000"},{"label": "극단적인 입력값에서 중단되지 않도록 난수 분포 함수의 시행 횟수를 제한하는 새로운 설정입니다."}]}]} />

`randBinomial` 및 `randNegativeBinomial` 같은 난수 분포 함수에 허용되는 최대 시행 횟수입니다. 시행 횟수가 클 때 계산 시간이 지나치게 길어지는 것을 방지합니다. `0`은 제한을 비활성화하며, 설정값은 기본값보다 높게 지정할 수 있습니다. 단, 확률이 엄격히 0과 1 사이인 `randBinomial`은 항상 10^9회를 초과하는 시행을 거부합니다. 최악의 경우 단일 샘플의 비용이 시행 횟수에 비례하며, 그러한 비용이 발생할 확률도 시행 횟수에 따라 증가하기 때문입니다. 확률이 0 또는 1인 경우에는 샘플링에 일정한 시간만 소요되므로 이 하드 제한이 적용되지 않습니다.
