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

# max_hyperscan_* セッション設定

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

<div id="max_hyperscan_regexp_length">
  ## max\_hyperscan\_regexp\_length
</div>

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

[hyperscan multi-match 関数](/docs/ja/reference/functions/regular-functions/string-search-functions#multiMatchAny)における各正規表現の最大長を指定します。

設定可能な値:

* 正の整数。
* 0 - 長さは無制限です。

**例**

クエリ:

```sql theme={null}
SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 3;
```

結果:

```text theme={null}
┌─multiMatchAny('abcd', ['ab', 'bcd', 'c', 'd'])─┐
│                                              1 │
└────────────────────────────────────────────────┘
```

クエリ:

```sql theme={null}
SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 2;
```

結果:

```text theme={null}
Exception: Regexp length too large.
```

**関連項目**

* [max\_hyperscan\_regexp\_total\_length](/docs/ja/reference/settings/session-settings/max-hyperscan#max_hyperscan_regexp_total_length)

<div id="max_hyperscan_regexp_total_length">
  ## max\_hyperscan\_regexp\_total\_length
</div>

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

各 [hyperscan multi-match 関数](/docs/ja/reference/functions/regular-functions/string-search-functions#multiMatchAny) で使用される、すべての正規表現の合計長の上限を設定します。

設定可能な値:

* 正の整数。
* 0 - 長さは制限されません。

**例**

クエリ:

```sql theme={null}
SELECT multiMatchAny('abcd', ['a','b','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5;
```

結果:

```text theme={null}
┌─multiMatchAny('abcd', ['a', 'b', 'c', 'd'])─┐
│                                           1 │
└─────────────────────────────────────────────┘
```

クエリ:

```sql theme={null}
SELECT multiMatchAny('abcd', ['ab','bc','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5;
```

結果:

```text theme={null}
Exception: Total regexp lengths too large.
```

**関連項目**

* [max\_hyperscan\_regexp\_length](/docs/ja/reference/settings/session-settings/max-hyperscan#max_hyperscan_regexp_length)
