Skip to content

Commit

Permalink
DOCAPI-7430: MergeTree INDEX bloom filter docs. (#5992)
Browse files Browse the repository at this point in the history
* DOCAPI-7430: MergeTree INDEX bloom filter docs.

* DOCAPI-7430: Updated bloom filter docs with the parameter description.
  • Loading branch information
BayoNet committed Aug 16, 2019
1 parent da6925f commit 4b91e02
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/en/operations/table_engines/mergetree.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster]
[SETTINGS name=value, ...]
```

For descriptions of request parameters, see the [request description](../../query_language/create.md).
For a description of parameters, see the [CREATE query description](../../query_language/create.md).

!!! note "Note"
`INDEX` is an experimental feature, see [Data Skipping Indexes](#table_engine-mergetree-data_skipping-indexes).

### Query Clauses

Expand Down Expand Up @@ -236,7 +239,7 @@ ClickHouse cannot use an index if the values of the primary key in the query par

ClickHouse uses this logic not only for days of the month sequences, but for any primary key that represents a partially-monotonic sequence.

### Data Skipping Indices (Experimental)
### Data Skipping Indexes (Experimental) {#table_engine-mergetree-data_skipping-indexes}

You need to set `allow_experimental_data_skipping_indices` to 1 to use indices. (run `SET allow_experimental_data_skipping_indices = 1`).

Expand Down Expand Up @@ -295,6 +298,14 @@ SELECT count() FROM table WHERE u64 * i32 == 10 AND u64 * length(s) >= 1234

The same as `ngrambf_v1`, but stores tokens instead of ngrams. Tokens are sequences separated by non-alphanumeric characters.

- `bloom_filter([false_positive])` — Stores [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter) for the specified columns.

The `false_positive` optional parameter is the probability of false positive response from the filter. Possible values: (0, 1). Default value: 0.025.

Supported data types: `Int*`, `UInt*`, `Float*`, `Enum`, `Date`, `DateTime`, `String`, `FixedString`.

Supported for the following functions: [equals](../../query_language/functions/comparison_functions.md), [notEquals](../../query_language/functions/comparison_functions.md), [in](../../query_language/functions/in_functions.md), [notIn](../../query_language/functions/in_functions.md).

```sql
INDEX sample_index (u64 * length(s)) TYPE minmax GRANULARITY 4
INDEX sample_index2 (u64 * length(str), i32 + f64 * 100, date, str) TYPE set(100) GRANULARITY 4
Expand Down

0 comments on commit 4b91e02

Please sign in to comment.