Support bloom filter for any type#5678
Merged
alexey-milovidov merged 7 commits intoClickHouse:masterfrom Jun 29, 2019
Merged
Conversation
11004d0 to
a50aea0
Compare
Contributor
Author
|
Performance info: CREATE TABLE bf_performance_test
(
`order_key` Int64,
`bf_index` String,
`other_column_1` UInt64,
`other_column_2` UInt32,
`other_column_3` String,
`other_column_4` Float64,
INDEX idx bf_index TYPE bloom_filter GRANULARITY 1
)
ENGINE = MergeTree
ORDER BY order_key
SETTINGS index_granularity = 8192;
INSERT INTO bf_performance_test SELECT
number AS order_key,
toString(number) AS bf_index,
number AS other_column_1,
toUInt32(number) AS other_column_2,
toString(number) AS other_column_3,
toFloat64(number) AS other_column_4
FROM system.numbers
LIMIT 1000000000;
SELECT COUNT()
FROM bf_performance_test;
┌────COUNT()─┐
│ 1000000000 │
└────────────┘
1 rows in set. Elapsed: 2.652 sec. Processed 1.00 billion rows, 4.00 GB (377.10 million rows/s., 1.51 GB/s.)
SELECT *
FROM bf_performance_test
WHERE bf_index = '200000';
┌─order_key─┬─bf_index─┬─other_column_1─┬─other_column_2─┬─other_column_3─┬─other_column_4─┐
│ 200000 │ 200000 │ 200000 │ 200000 │ 200000 │ 200000 │
└───────────┴──────────┴────────────────┴────────────────┴────────────────┴────────────────┘
1 rows in set. Elapsed: 2.867 sec. Processed 23.61 million rows, 422.31 MB (8.24 million rows/s., 147.31 MB/s.) Processed rows ≈ Total rows * false positive probability(default 2.5%) |
|
COOL |
Contributor
|
nice! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Category:
Detailed description:
Add bloom filter for
Number,Enum,Date,DateTime,StringandFixedStringDataTypes. bloom filter index working onequals,notEquals,in,notInfunctions.