diff --git a/docs/cn/sql-reference/00-sql-reference/30-table-engines/00-fuse.md b/docs/cn/sql-reference/00-sql-reference/30-table-engines/00-fuse.md index 330a00ebce..91c45e53b0 100644 --- a/docs/cn/sql-reference/00-sql-reference/30-table-engines/00-fuse.md +++ b/docs/cn/sql-reference/00-sql-reference/30-table-engines/00-fuse.md @@ -4,7 +4,7 @@ title: Fuse Engine 表 import FunctionDescription from '@site/src/components/FunctionDescription'; - + ## 概述 @@ -126,6 +126,29 @@ CREATE TABLE ( --- +### `bloom_index_type` + +- **语法:** + `bloom_index_type = 'xor8' | 'binary_fuse32'` +- **描述:** + 指定 Bloom Index 使用的过滤器算法类型。默认为 `xor8`。对于有大量点查(point lookup)的表,推荐使用 `binary_fuse32`,它具有更低的误判率,但索引体积约为 `xor8` 的 4 倍。 + + 注意:`ALTER TABLE ... SET OPTIONS(bloom_index_type = ...)` 只影响新写入的数据和重建的 Bloom Index,已有的 `xor8` 格式索引文件与新的 `binary_fuse32` 索引文件可以在同一张表中共存。 + + **示例:** + ```sql + -- 建表时指定 bloom_index_type + CREATE TABLE t (a INT) bloom_index_type = 'binary_fuse32'; + + -- 修改已有表的 bloom_index_type(只影响后续写入) + ALTER TABLE t SET OPTIONS(bloom_index_type = 'binary_fuse32'); + + -- 改回 xor8 + ALTER TABLE t SET OPTIONS(bloom_index_type = 'xor8'); + ``` + +--- + ### `change_tracking` - **语法:** diff --git a/docs/en/sql-reference/00-sql-reference/30-table-engines/00-fuse.md b/docs/en/sql-reference/00-sql-reference/30-table-engines/00-fuse.md index 73181a5d46..27c532e072 100644 --- a/docs/en/sql-reference/00-sql-reference/30-table-engines/00-fuse.md +++ b/docs/en/sql-reference/00-sql-reference/30-table-engines/00-fuse.md @@ -4,7 +4,7 @@ title: Fuse Engine Tables import FunctionDescription from '@site/src/components/FunctionDescription'; - + ## Overview @@ -117,6 +117,28 @@ Below are the available Fuse Engine options, grouped by their purpose: --- +### `bloom_index_type` +- **Syntax:** + `bloom_index_type = 'xor8' | 'binary_fuse32'` +- **Description:** + Specifies the filter algorithm used for the bloom index. Defaults to `xor8`. Use `binary_fuse32` for tables with heavy point-lookup workloads — it offers a lower false-positive rate at the cost of a larger index size (approximately 4x that of `xor8`). + + Note that `ALTER TABLE ... SET OPTIONS(bloom_index_type = ...)` only affects new writes and rebuilt bloom indexes. Existing `xor8` index files and new `binary_fuse32` index files can coexist in the same table. + + **Examples:** + ```sql + -- Set bloom_index_type at table creation + CREATE TABLE t (a INT) bloom_index_type = 'binary_fuse32'; + + -- Change bloom_index_type for an existing table (affects new writes only) + ALTER TABLE t SET OPTIONS(bloom_index_type = 'binary_fuse32'); + + -- Revert to xor8 + ALTER TABLE t SET OPTIONS(bloom_index_type = 'xor8'); + ``` + +--- + ### `change_tracking` - **Syntax:** `change_tracking = True / False`