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

# optimize_move_to_prewhere_* セッション設定

> optimize_move_to_prewhere_* グループに含まれる 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/ja/reference/system-tables/settings) で参照でき、[ソースコード](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) から自動生成されています。

<div id="optimize_move_to_prewhere">
  ## optimize\_move\_to\_prewhere
</div>

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

[SELECT](/docs/ja/reference/statements/select/index) クエリでの自動 [PREWHERE](/docs/ja/reference/statements/select/prewhere) 最適化を有効または無効にします。

[\*MergeTree](/docs/ja/reference/engines/table-engines/mergetree-family/index) テーブルでのみ機能します。

設定可能な値:

* 0 — 自動 `PREWHERE` 最適化は無効です。
* 1 — 自動 `PREWHERE` 最適化は有効です。

<div id="optimize_move_to_prewhere_if_final">
  ## optimize\_move\_to\_prewhere\_if\_final
</div>

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

[FINAL](/docs/ja/reference/statements/select/from#final-modifier) 修飾子付きの [SELECT](/docs/ja/reference/statements/select/index) クエリで、自動 [PREWHERE](/docs/ja/reference/statements/select/prewhere) 最適化を有効または無効にします。

[\*MergeTree](/docs/ja/reference/engines/table-engines/mergetree-family/index) テーブルでのみ機能します。

設定可能な値:

* 0 — `FINAL` 修飾子付きの `SELECT` クエリでの自動 `PREWHERE` 最適化は無効です。
* 1 — `FINAL` 修飾子付きの `SELECT` クエリでの自動 `PREWHERE` 最適化は有効です。

**関連項目**

* [optimize\_move\_to\_prewhere](/docs/ja/reference/settings/session-settings/optimize-move-to-prewhere#optimize_move_to_prewhere) 設定
