我有一个像
这样的查询create table table1 (unique i1 (col1,col2))
select
col1,
col2,
group_concat(distinct case when type=3 then value end order by value desc separator ',') col3,
group_concat(distinct case when type=4 then value end order by value desc separator ',') col4,
group_concat(distinct case when type=5 then value end order by value desc separator ',') col5,
...
group_concat(distinct case when type=N then value end order by value desc separator ',') colN
from table2
group by col1,col2
order by null
它运行正常,但如果N“太高”(超过50列),它会在64位服务器上发出内存错误,内存为16GB
我应该检查哪些变量?