我们有安装了mariadb的centos 7机器
当我运行:
SELECT h.id,
h.name,
group_concat(distinct d.name ORDER BY d.name SEPARATOR " ") AS descriptions
FROM inventar h
LEFT JOIN descriptions d ON(FIND_IN_SET(d.id, h.description_id) > 0) GROUP BY h.id,h.description_id
ORDER BY h.name asc;
ERROR 5 (HY000): Out of memory (Needed 65535816 bytes)
我读到它可能限制了临时表的大小。
我检查了尺寸:
MariaDB [wexac_hosts]比;显示像"%table_size%"
这样的变量Variable_name | Value | max_heap_table_size | 1048576000 |
---|---|
tmp_disk_table_size | 18446744073709551615 |
tmp_memory_table_size | 12572426240 |
tmp_table_size | 12572426240 |
如果GROUP_CONCAT
内存不足,则需要增加group_concat_max_len
的内存。
来自GROUP_CONCAT
文档:
返回的最大字节长度由group_concat_max_len服务器系统变量,默认为1M (>=MariaDB 10.2.4)或1K (<= MariaDB 10.2.3).