Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the maximum allowance for group_concat_max_len in MySQL?

I am using a group_concat to concatenate a lot of rows into one.

I set group concat to 10000 using:

SET group_concat_max_len = 10000; 

But even then, my output cells remain incomplete and end with ...

I tried setting group_concat_max_len = 20000 and even that didn't help.

I also tried setting group_concat_max_len to 99999999. It still doesn't complete my output text. And I checked one of the group concat stops at Length = 230 characters and then gives ...

Is there any other way?

like image 224
user3422637 Avatar asked Oct 24 '14 18:10

user3422637


People also ask

What is Group_concat_max_len in MySQL?

As MySQL Blog by @Shlomi Noach Here group_concat_max_len : This parameter limits the maximum text length of a GROUP_CONCAT concatenation result. It defaults to 1024 .

Is there a length limit to Group_concat?

Show activity on this post. I'm using GROUP_CONCAT() in a MySQL query to convert multiple rows into a single string. However, the maximum length of the result of this function is 1024 characters.


1 Answers

Check out this link: https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_group_concat_max_len

All the MySQL configuration variables are documented on that page, with details like minimum, maximum, default value, whether you can set them globally or per-session, whether you can change them on a running instance or does it require a restart, and other description of usage.

The maximum value for group_concat_max_len is 18446744073709551615.

The group-concat string does not end with "..." If you try to group too much text, it just gets truncated. So I wonder if the problem is not with MySQL's settings, but with the display of your cells.

like image 67
Bill Karwin Avatar answered Sep 20 '22 21:09

Bill Karwin