Details
Description
A query like
SELECT GROUP_CONCAT( seq, seq, seq, seq, seq, seq, seq, seq ORDER BY 2,1,3,4,6,5,8,7 ) AS cfield1 FROM seq_1_to_50000000
|
easily uses up to 4-5 Gb memory while it's running.
<montywi> everything has limits
<montywi> even for filesort; For bigger things it should always hit disk, never memory
...
<montywi> the problem is that when doing a sort, we create a sorted tree in memory
<montywi> however there is no memory check for this
<montywi> so this can be any size
<montywi> Normally it would make sense to limit this to group_concat_max_length, but I fear that would break things, as we sort records there, which can have a notable overhead
<montywi> So I have limit it to max_heap_table_size
Attachments
Issue Links
- is duplicated by
-
MDEV-30282 Uncontrollable memory consumption upon GROUP_CONCAT with ORDER BY
- Closed