Size: a a a

ClickHouse не тормозит

2020 August 03

DC

Denny Crane (I don't... in ClickHouse не тормозит
TTL кстати вроде пофикшен
источник

DC

Denny Crane (I don't... in ClickHouse не тормозит
и кстати, там например некоторые "баги" совсем и не баги
https://github.com/ClickHouse/ClickHouse/pull/13252#issuecomment-667734024
источник

D

Dj in ClickHouse не тормозит
Denny Crane (I don't work at Yandex (never did))
TTL кстати вроде пофикшен
по полной перезаписи всех партов на materialize ttl надо будет проверить на последней, оно тут не упомянуто https://github.com/ClickHouse/ClickHouse/issues/10128
источник

АА

Алексей Артамонов... in ClickHouse не тормозит
Denny Crane (I don't work at Yandex (never did))
реплики КХ не видят друг друга? select * from system.replication_queue на обоих
там совсем пусто, приэтом ошибок в КХ нету
источник

DC

Denny Crane (I don't... in ClickHouse не тормозит
Алексей Артамонов
там совсем пусто, приэтом ошибок в КХ нету
ну а таблица как создана? Engine ....
что в system.marcos ?
источник

МЦ

Михаил Цветков... in ClickHouse не тормозит
Парни привет! Можете посоветовать open-source clickstream коллекторы?
И уж совсем странный вопрос - встречали коллекторы, которые в базе умеют определять основные типы ивентов на странице?
источник
2020 August 04

АА

Алексей Артамонов... in ClickHouse не тормозит
Denny Crane (I don't work at Yandex (never did))
ну а таблица как создана? Engine ....
что в system.marcos ?
CREATE TABLE test.blogger_likers ON CLUSTER dev (     created Date DEFAULT CAST(now(), 'Date'),     post_id UInt64,     blogger_id UInt64,     liker_id UInt64,     liker_username String ) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/test/blogger_likers', '{replica}') PARTITION BY toYYYYMM(created) ORDER BY (blogger_id, liker_id) SAMPLE BY liker_id SETTINGS index_granularity = 8192
источник

WA

Well Ageev in ClickHouse не тормозит
Парни привет, есть у кого дашборд для графаны с метриками из клик хауса для прометея, а не для экспортера?
источник

WA

Well Ageev in ClickHouse не тормозит
поделитесь пожалуйста json файликом
источник

AB

Artem Bochkov in ClickHouse не тормозит
Коллеги, приветствую!
Подскажите, в чем может быть проблема?

Есть запрос, он возвращает 594 строки:
SELECT id
FROM shop_clients
WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')

594 rows in set. Elapsed: 0.040 sec. Processed 1.88 million rows, 37.63 MB (47.12 million rows/s., 942.76 MB/s.)

Если обавляем вывод еще одной колонки — количество результирующих строк сразу вырастает на три порядка:
SELECT id, phone
FROM shop_clients
WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')

840948 rows in set. Elapsed: 0.171 sec. Processed 1.88 million rows, 81.63 MB (10.98 million rows/s., 476.61 MB/s.)

ENGINE = MergeTree.

При этом если посчитать строки, то вместо 840948 опять будет будет 594:
SELECT count(1)
FROM
(
   SELECT
       id,
       phone
   FROM shop_clients
   WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')
)

┌─count(1)─┐
│      594 │
└──────────┘


Характер использования таблицы такой: она раз в период дропается, создается заново и в нее с нуля консольным клиентов импортируется tsv, содержащий дама mysql-ной таблицы.

Спасибо!
источник

l

lnuynxa in ClickHouse не тормозит
Artem Bochkov
Коллеги, приветствую!
Подскажите, в чем может быть проблема?

Есть запрос, он возвращает 594 строки:
SELECT id
FROM shop_clients
WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')

594 rows in set. Elapsed: 0.040 sec. Processed 1.88 million rows, 37.63 MB (47.12 million rows/s., 942.76 MB/s.)

Если обавляем вывод еще одной колонки — количество результирующих строк сразу вырастает на три порядка:
SELECT id, phone
FROM shop_clients
WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')

840948 rows in set. Elapsed: 0.171 sec. Processed 1.88 million rows, 81.63 MB (10.98 million rows/s., 476.61 MB/s.)

ENGINE = MergeTree.

При этом если посчитать строки, то вместо 840948 опять будет будет 594:
SELECT count(1)
FROM
(
   SELECT
       id,
       phone
   FROM shop_clients
   WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')
)

┌─count(1)─┐
│      594 │
└──────────┘


Характер использования таблицы такой: она раз в период дропается, создается заново и в нее с нуля консольным клиентов импортируется tsv, содержащий дама mysql-ной таблицы.

Спасибо!
какая версия кх?
источник

ДБ

Дмитрий Бережнов... in ClickHouse не тормозит
Artem Bochkov
Коллеги, приветствую!
Подскажите, в чем может быть проблема?

Есть запрос, он возвращает 594 строки:
SELECT id
FROM shop_clients
WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')

594 rows in set. Elapsed: 0.040 sec. Processed 1.88 million rows, 37.63 MB (47.12 million rows/s., 942.76 MB/s.)

Если обавляем вывод еще одной колонки — количество результирующих строк сразу вырастает на три порядка:
SELECT id, phone
FROM shop_clients
WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')

840948 rows in set. Elapsed: 0.171 sec. Processed 1.88 million rows, 81.63 MB (10.98 million rows/s., 476.61 MB/s.)

ENGINE = MergeTree.

При этом если посчитать строки, то вместо 840948 опять будет будет 594:
SELECT count(1)
FROM
(
   SELECT
       id,
       phone
   FROM shop_clients
   WHERE (integer_2 != toInt32(1737)) AND (integer_2 != toInt32(1761)) AND (integer_2 != toInt32(1762)) AND (integer_2 != toInt32(1736)) AND (integer_2 != toInt32(1763)) AND (integer_2 != toInt32(1787)) AND (integer_2 != toInt32(1788)) AND (integer_30 = toInt32(1)) AND (integer_9 = toInt32(30)) AND (region_id IN (toInt32(1), toInt32(2), toInt32(3), toInt32(4), toInt32(5), toInt32(6), toInt32(7), toInt32(8), toInt32(9), toInt32(10), toInt32(11))) AND (shop_clients.is_deleted != 'Y')
)

┌─count(1)─┐
│      594 │
└──────────┘


Характер использования таблицы такой: она раз в период дропается, создается заново и в нее с нуля консольным клиентов импортируется tsv, содержащий дама mysql-ной таблицы.

Спасибо!
Покажите show create table shop_clients
источник

AB

Artem Bochkov in ClickHouse не тормозит
ClickHouse server version 19.16.3 revision 54427.

`
SHOW CREATE TABLE shop_clients

┌─
statement──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
источник

AB

Artem Bochkov in ClickHouse не тормозит
│ CREATE TABLE rfm_db_opinion.shop_clients (`id` Int64, date_add Nullable(DateTime), date_upd Nullable(DateTime), uid Nullable(String), site_user_id Int32, local_id Nullable(String), full_name Nullable(String), first_name Nullable(String), middle_name Nullable(String), last_name Nullable(String), email Nullable(String), email_orig Nullable(String), email_validation_code Int32, email_validation_date Nullable(DateTime), email_edited String, email_error_count Int32, phone Nullable(String), phone_orig Nullable(String), phone_type Nullable(Int32), phone_validation_code Int32, phone_validation_date Nullable(DateTime), phone_edited String, phone_error_count Int32, push_id Nullable(String), timezone Nullable(String), sex Nullable(String), birth_date Nullable(UInt64), country Nullable(String), city Nullable(String), zip Nullable(String), register_date Nullable(DateTime), first_order_date Nullable(DateTime), first_order_number Nullable(String), first_order_items_sum Float32, last_order_id Int64, last_order_date Nullable(DateTime), last_order_number Nullable(String), last_order_items_sum Float32, order_cnt Int32, order_average_check Float32, order_sum Float32, order_cnt_rfm Int32, order_average_check_rfm Float32, order_sum_rfm Float32, last_visit_date Nullable(DateTime), last_visit_days Int32, r_seg_now Int32, f_seg_now Int32, m_seg_now Int32, r_seg_prev Int32, f_seg_prev Int32, m_seg_prev Int32, rfm_date_upd Nullable(DateTime), bonus_active Float32, bonus_expect_activate Float32, bonus_expect_deactivate Float32, bonus_expect_deactivate_next_date Nullable(DateTime), bonus_expect_deactivate_next_value Float32, subscribe_email String, subscribe_sms String, subscribe_push String, active String, in_global_control_group String, integer_1 Nullable(Int32), integer_2 Nullable(Int32), integer_3 Nullable(Int32), integer_4 Nullable(Int32), integer_5 Nullable(Int32), integer_6 Nullable(Int32), integer_7 Nullable(Int32), integer_8 Nullable(Int32), integer_9 Nullable(Int32), integer_10 Nullable(Int32), integer_11 Nullable(Int32), integer_12 Nullable(Int32), integer_13 Nullable(Int32), integer_14 Nullable(Int32), integer_15 Nullable(Int32), integer_16 Nullable(Int32), integer_17 Nullable(Int32), integer_18 Nullable(Int32), integer_19 Nullable(Int32), integer_20 Nullable(Int32), integer_21 Nullable(Int32), integer_22 Nullable(Int32), integer_23 Nullable(Int32), integer_24 Nullable(Int32), integer_25 Nullable(Int32), integer_26 Nullable(Int32), integer_27 Nullable(Int32), integer_28 Nullable(Int32), integer_29 Nullable(Int32), integer_30 Nullable(Int32), integer_31 Nullable(Int32), integer_32 Nullable(Int32), integer_33 Nullable(Int32), integer_34 Nullable(Int32), integer_35 Nullable(Int32), double_1 Nullable(Float32), double_2 Nullable(Float32), double_3 Nullable(Float32), double_4 Nullable(Float32), double_5 Nullable(Float32), double_6 Nullable(Float32), double_7 Nullable(Float32), double_8 Nullable(Float32), double_9 Nullable(Float32), double_10 Nullable(Float32), double_11 Nullable(Float32), double_12 Nullable(Float32), double_13 Nullable(Float32), double_14 Nullable(Float32), double_15 Nullable(Float32), double_16 Nullable(Float32), double_17 Nullable(Float32), double_18 Nullable(Float32), double_19 Nullable(Float32), double_20 Nullable(Float32), date_1 Nullable(DateTime), date_2 Nullable(DateTime), date_3 Nullable(DateTime), date_4 Nullable(DateTime), date_5 Nullable(DateTime), date_6 Nullable(DateTime), date_7 Nullable(DateTime), date_8 Nullable(DateTime), date_9 Nullable(DateTime), date_10 Nullable(DateTime), date_11 Nullable(DateTime), date_12 Nullable(DateTime), date_13 Nullable(DateTime), date_14 Nullable(DateTime), date_15 Nullable(DateTime), date_16 Nullable(DateTime), date_17 Nullable(DateTime), date_18 Nullable(DateTime), date_19 Nullable(DateTime), date_20 Nullabl
источник

AB

Artem Bochkov in ClickHouse не тормозит
e(DateTime), string_1 Nullable(String), string_2 Nullable(String), string_3 Nullable(String), string_4 Nullable(String), string_5 Nullable(String), string_6 Nullable(String), string_7 Nullable(String), string_8 Nullable(String), string_9 Nullable(String), string_10 Nullable(String), string_11 Nullable(String), string_12 Nullable(String), string_13 Nullable(String), string_14 Nullable(String), string_15 Nullable(String), string_16 Nullable(String), string_17 Nullable(String), string_18 Nullable(String), string_19 Nullable(String), string_20 Nullable(String), boolean_1 Nullable(String), boolean_2 Nullable(String), boolean_3 Nullable(String), boolean_4 Nullable(String), boolean_5 Nullable(String), boolean_6 Nullable(String), boolean_7 Nullable(String), boolean_8 Nullable(String), boolean_9 Nullable(String), boolean_10 Nullable(String), boolean_11 Nullable(String), boolean_12 Nullable(String), boolean_13 Nullable(String), boolean_14 Nullable(String), boolean_15 Nullable(String), boolean_16 Nullable(String), boolean_17 Nullable(String), boolean_18 Nullable(String), boolean_19 Nullable(String), boolean_20 Nullable(String), region_id Nullable(Int32), is_deleted String, ch_date Date) ENGINE = MergeTree(ch_date, site_user_id, 8192) │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
`
источник

RS

Roman Skidan in ClickHouse не тормозит
Всем привет. Есть запрос KILL QUERY WHERE query_id = 'smth'. А можно как-то узнать id запроса, если я все запросы делаю через JDBC официальный драйвер?
источник

K

Kid in ClickHouse не тормозит
Roman Skidan
Всем привет. Есть запрос KILL QUERY WHERE query_id = 'smth'. А можно как-то узнать id запроса, если я все запросы делаю через JDBC официальный драйвер?
Ну если доступна табличка system.processes, там лежит
источник

RS

Roman Skidan in ClickHouse не тормозит
Таблица то есть. Тут тогда делать SELECT  query_id FROM system.processes WHERE query = 'SELECT * FROM smth'?
источник

K

Kid in ClickHouse не тормозит
Roman Skidan
Таблица то есть. Тут тогда делать SELECT  query_id FROM system.processes WHERE query = 'SELECT * FROM smth'?
query_id какого запроса вам нужно? Если SELECT * FROM smth, то да, но мб там в query свои символы есть, точно не скажу
источник

RS

Roman Skidan in ClickHouse не тормозит
Ну да, там добавляется FORMAT
источник