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

# allow_nondeterministic_* 会话设置

> ClickHouse 中 allow_nondeterministic_* 生成组的会话设置。

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/zh/reference/system-tables/settings) 中查看，并由 [源代码](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="allow_nondeterministic_mutations">
  ## allow\_nondeterministic\_mutations
</div>

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

允许复制表上的变更使用 `dictGet` 等非确定性函数的用户级设置。

例如，字典在各个节点之间可能会不同步，因此默认情况下，禁止复制表上的变更从字典中拉取值。启用此设置后将允许这种行为，但用户有责任确保所使用的数据在所有节点之间都是同步的。

**示例**

```xml theme={null}
<profiles>
    <default>
        <allow_nondeterministic_mutations>1</allow_nondeterministic_mutations>

        <!-- ... -->
    </default>

    <!-- ... -->

</profiles>
```

<div id="allow_nondeterministic_optimize_skip_unused_shards">
  ## allow\_nondeterministic\_optimize\_skip\_unused\_shards
</div>

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

允许在分片键中使用非确定性函数 (如 `rand` 或 `dictGet`，不过后者在更新方面有一些注意事项) 。

可能的值：

* 0 — 不允许。
* 1 — 允许。
