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

# replace_running_query_* 세션 설정

> 자동 생성된 replace_running_query_* 그룹의 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="replace_running_query">
  ## replace\_running\_query
</div>

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

HTTP 인터페이스를 사용할 때 `query_id` 매개변수를 전달할 수 있습니다. 이는 쿼리 식별자로 사용되는 임의의 문자열입니다.
현재 동일한 사용자에 대해 같은 `query_id`를 가진 쿼리가 이미 존재하면, 동작은 `replace_running_query` 매개변수에 따라 달라집니다.

`0` (기본값) – 예외를 발생시킵니다(같은 `query_id`를 가진 쿼리가 이미 실행 중이면 새 쿼리의 실행을 허용하지 않음).

`1` – 기존 쿼리를 취소하고 새 쿼리를 실행합니다.

세분화 조건 제안 기능을 구현하려면 이 매개변수를 1로 설정하십시오. 다음 문자를 입력했을 때 이전 쿼리가 아직 끝나지 않았다면 해당 쿼리를 취소해야 합니다.

<div id="replace_running_query_max_wait_ms">
  ## replace\_running\_query\_max\_wait\_ms
</div>

<SettingsInfoBlock type="Milliseconds" default_value="5000" />

[replace\_running\_query](/docs/ko/reference/settings/session-settings/replace-running-query#replace_running_query) 설정이 활성화되어 있을 때, 동일한 `query_id`를 가진 쿼리의 실행이 끝날 때까지 대기하는 시간입니다.

가능한 값:

* 양의 정수입니다.
* 0 — 서버가 이미 동일한 `query_id`를 가진 쿼리를 실행 중인 경우, 새 쿼리를 실행할 수 없도록 예외를 발생시킵니다.
