mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-05 23:31:24 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
23 lines
499 B
SQL
23 lines
499 B
SQL
DROP TABLE IF EXISTS set_array;
|
|
|
|
CREATE TABLE set_array
|
|
(
|
|
primary_key String,
|
|
index_array Array(UInt64),
|
|
INDEX additional_index_array (index_array) TYPE set(10000) GRANULARITY 1
|
|
) ENGINE = MergeTree()
|
|
ORDER BY (primary_key);
|
|
|
|
INSERT INTO set_array
|
|
select
|
|
toString(intDiv(number, 1000000)) as primary_key,
|
|
array(number) as index_array
|
|
from system.numbers
|
|
limit 10000000;
|
|
|
|
SET max_rows_to_read = 8192;
|
|
|
|
select count() from set_array where has(index_array, 333);
|
|
|
|
DROP TABLE set_array;
|