Following this post: POST ABOUT CONCAT
My problem is that i have many rows
SET group_concat_max_len := @@max_allowed_packet
SHOW VARIABLES LIKE 'group_concat_max_len'
DISTINCT Item.ItemID as item
,GROUP_CONCAT(Description.DescriptionID) AS description
LEFT OUTER JOIN descriptionpack
LEFT OUTER JOIN description
GROUP BY item
I reviewed your question with our hosting team. You wouldn't be able
to change the global settings for that and other variables. However,
you should be able to set that variable on a per session basis by
setting it first, before other queries. Hope that helps.
Presumably you're using
GROUP_CONCAT(), not simple
The default value of the
group_concat_max_len is 1024, which is a pretty small limit if you're building up big long concatenations.
To change it, use this command. I've set the length in this example to 100,000. You could set it to anything you need.
SET SESSION group_concat_max_len = 100000;
The usual value for max_allowed_packet is one megabyte, which is likely more than you need.
group_concat_max_len itself has an effectively unlimited size. It's limited only by the unsigned word length of the platform: 2^32-1 on a 32-bit platform and 2^64-1 on a 64-bit platform.
If that still isn't enough for your application, it's time to take @eggyal's suggestion and rethink your approach.