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

# parallel_* セッション設定

> parallel_* 生成グループの 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>;
};

export const BetaBadge = ({link, galaxyTrack, galaxyEvent}) => {
  if (link) {
    return <a href={link} target="_blank" rel="noopener noreferrer" className="betaBadge" onClick={galaxyTrack && galaxyEvent ? galaxyOnClick(galaxyEvent) : undefined}>
                <Icon />
                <span>ベータ</span>
            </a>;
  }
  return <div className="betaBadge">
            <Icon />
            <span>
                ベータ機能です。 
                <u>
                    <a href="/docs/docs/beta-and-experimental-features#beta-features">
                        詳しくはこちら。
                    </a>
                </u>
            </span>
        </div>;
};

これらの設定は [system.settings](/docs/ja/reference/system-tables/settings) で確認でき、[ソースコード](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) から自動生成されています。

<div id="parallel_distributed_insert_select">
  ## parallel\_distributed\_insert\_select
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.7"},{"label": "2"},{"label": "デフォルトで並列分散 insert select を有効化"}]}]} />

分散 `INSERT ... SELECT` クエリの並列実行を有効にします。

`INSERT INTO distributed_table_a SELECT ... FROM distributed_table_b` クエリを実行し、両方のテーブルが同じクラスターを使用していて、かつ両方のテーブルが [replicated](/docs/ja/reference/engines/table-engines/mergetree-family/replication) または非レプリケートである場合、このクエリは各分片でローカルに処理されます。

設定可能な値:

* `0` — 無効。
* `1` — `SELECT` は、Distributedエンジンの基になるテーブルに対して各分片で実行されます。
* `2` — `SELECT` と `INSERT` は、Distributedエンジンの基になるテーブルに対して各分片で実行されます。

v25.4 以降では、`ReplicatedMergeTree` または `SharedMergeTree` をソースとする `INSERT ... SELECT` も、レプリカ間で並列化できます。有効にするには、次のように設定します:

* `parallel_distributed_insert_select = 2`
* `enable_parallel_replicas = 1`

<div id="parallel_hash_join_threshold">
  ## parallel\_hash\_join\_threshold
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.5"},{"label": "100000"},{"label": "新しい設定"}]}, {"id": "row-2","items": [{"label": "25.4"},{"label": "0"},{"label": "新しい設定"}]}, {"id": "row-3","items": [{"label": "25.3"},{"label": "0"},{"label": "新しい設定"}]}]} />

ハッシュベースの JOIN アルゴリズムが適用される場合、このしきい値は `hash` と `parallel_hash` のどちらを使用するかを判断するのに役立ちます (右テーブルのサイズを見積もれる場合に限ります) 。
前者は、右テーブルのサイズがしきい値未満であることがわかっている場合に使用されます。

<div id="parallel_non_joined_rows_processing">
  ## parallel\_non\_joined\_rows\_processing
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.2"},{"label": "1"},{"label": "RIGHT/FULL parallel_hash 結合で、右テーブルの非結合行を並列処理するための新しい設定。"}]}]} />

RIGHT JOIN および FULL JOIN の実行時に、右テーブルの非結合行を複数のスレッドで並列に処理できるようにします。
これにより、大きなテーブルで `parallel_hash` 結合アルゴリズムを使用する場合、非結合フェーズを高速化できます。
無効にすると、非結合行は単一のスレッドで処理されます。

<div id="parallel_replica_offset">
  ## parallel\_replica\_offset
</div>

<BetaBadge />

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

これは内部設定であり、直接使用すべきものではなく、「並列レプリカ」モードの実装上の詳細を表すものです。この設定は、分散クエリにおいて、並列レプリカのうちクエリ処理に参加するレプリカの索引として、イニシエーターサーバーによって自動的に設定されます。

<div id="parallel_view_processing">
  ## parallel\_view\_processing
</div>

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

順次ではなく、アタッチ済みのビューへのプッシュを同時実行できるようにします。
