mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Merge pull request #57787 from kitaisreal/serialization-string-reduce-memory-usage
SerializationString reduce memory usage
This commit is contained in:
commit
e989eb7bd2
@ -175,7 +175,7 @@ static NO_INLINE void deserializeBinarySSE2(ColumnString::Chars & data, ColumnSt
|
||||
offsets.push_back(offset);
|
||||
|
||||
if (unlikely(offset > data.size()))
|
||||
data.resize(roundUpToPowerOfTwoOrZero(std::max(offset, data.size() * 2)));
|
||||
data.resize_exact(roundUpToPowerOfTwoOrZero(std::max(offset, data.size() * 2)));
|
||||
|
||||
if (size)
|
||||
{
|
||||
|
@ -11,9 +11,11 @@ SETTINGS index_granularity = 1024, index_granularity_bytes = '10Mi';
|
||||
INSERT INTO order_by_desc SELECT number, repeat('a', 1024) FROM numbers(1024 * 300);
|
||||
OPTIMIZE TABLE order_by_desc FINAL;
|
||||
|
||||
SELECT s FROM order_by_desc ORDER BY u DESC LIMIT 10 FORMAT Null;
|
||||
SELECT s FROM order_by_desc ORDER BY u DESC LIMIT 10 FORMAT Null
|
||||
SETTINGS max_memory_usage = '400M';
|
||||
|
||||
SELECT s FROM order_by_desc ORDER BY u LIMIT 10 FORMAT Null;
|
||||
SELECT s FROM order_by_desc ORDER BY u LIMIT 10 FORMAT Null
|
||||
SETTINGS max_memory_usage = '400M';
|
||||
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user