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

# ajustes de sesión de optimize_move_to_prewhere_*

> Ajustes de sesión de ClickHouse del grupo generado optimize_move_to_prewhere_*.

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
  }}>Tipo</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Predeterminado</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Modificable sin reiniciar
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

Estas opciones de configuración están disponibles en [system.settings](/docs/es/reference/system-tables/settings) y se generan automáticamente a partir del [código fuente](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" />

Habilita o deshabilita la optimización automática de [PREWHERE](/docs/es/reference/statements/select/prewhere) en las consultas [SELECT](/docs/es/reference/statements/select/index).

Solo funciona con tablas [\*MergeTree](/docs/es/reference/engines/table-engines/mergetree-family/index).

Valores posibles:

* 0 — La optimización automática de `PREWHERE` está deshabilitada.
* 1 — La optimización automática de `PREWHERE` está habilitada.

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

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

Habilita o deshabilita la optimización automática de [PREWHERE](/docs/es/reference/statements/select/prewhere) en las consultas [SELECT](/docs/es/reference/statements/select/index) con el modificador [FINAL](/docs/es/reference/statements/select/from#final-modifier).

Solo funciona con tablas [\*MergeTree](/docs/es/reference/engines/table-engines/mergetree-family/index).

Posibles valores:

* 0 — La optimización automática de `PREWHERE` en las consultas `SELECT` con el modificador `FINAL` está deshabilitada.
* 1 — La optimización automática de `PREWHERE` en las consultas `SELECT` con el modificador `FINAL` está habilitada.

**Ver también**

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