https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/clickhouse/SJ9arSTPsKk/3c_jh3NLCwAJ, устанавливал set max_block_size=100000 и set max_insert_block_size=100000 и память выделял 50 ГБ на запрос все равно вылетает с ошибкой нехватки памяти типа
Progress: 181.85 million rows, 29.67 GB (25.12 million rows/s., 4.10 GB/s.) █████████████████████████████████▋ 53Received exception from server (version 18.10.3):
Code: 241. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Memory limit (for query) exceeded: would use 46.57 GiB (attempt to allocate chunk of 131072 bytes), maximum: 46.57 GiB.
0 rows in set. Elapsed: 7.316 sec. Processed 181.85 million rows, 29.67 GB (24.86 million rows/s., 4.06 GB/s.)
вот кусок конфига users.xml
<?xml version="1.0"?>
<yandex>
<!-- Profiles of settings. -->
<profiles>
<!-- Default settings. -->
<default>
<!-- Maximum memory usage for processing single query, in bytes. -->
<!-- <max_memory_usage>10000000000</max_memory_usage> -->
<max_memory_usage>50000000000</max_memory_usage>
<max_bytes_before_external_group_by>20000000000</max_bytes_before_external_group_by>
<!-- Use cache of uncompressed blocks of data. Meaningful only for processing many of very short queries. -->
<use_uncompressed_cache>0</use_uncompressed_cache>
<!-- How to choose between replicas during distributed query processing.
random - choose random replica from set of replicas with minimum number of errors
nearest_hostname - from set of replicas with minimum number of errors, choose replica
with minumum number of different symbols between replica's hostname and local hostname
(Hamming distance).
in_order - first live replica is choosen in specified order.
-->
<load_balancing>random</load_balancing>
</default>
<!-- Profile that allows only read queries. -->
<readonly>
<readonly>1</readonly>
</readonly>
</profiles>
...
Что за структура MV? Уменьшите размер max_block_size до 8к, например и max_threads в единицу
Обсуждают сегодня