#1
  1. Plays with fire
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2003
    Location
    Barsoom
    Posts
    1,146
    Rep Power
    144

    data limit reached with GROUP_CONCAT


    Hi--

    It looks like I'm reaching some server limit with a query using GROUP_CONCAT. It should be grouping more records than is returned and I'm learning there may be a setting somewhere to help with this:

    Code:
    group_concat_max_len
    I've seen people suggest setting:

    Code:
    SET SESSION group_concat_max_len
    or

    Code:
    SET GLOBAL group_concat_max_len
    This query is running on a VPS account so I should have access to the MySQL settings, but I don't know where or how to change this.

    Any ideas?

    Thank you!
    “Be ashamed to die until you have won some victory for humanity.” -- Horace Mann

    "...all men are created equal." -- US Declaration of Independence
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,392
    Rep Power
    9645
    You should be able to set session values fine.

    Or maybe you should fix your approach so that you aren't GROUP_CONCAT()ing >1KB of string data.
  4. #3
  5. Plays with fire
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2003
    Location
    Barsoom
    Posts
    1,146
    Rep Power
    144
    Originally Posted by requinix
    You should be able to set session values fine.

    Or maybe you should fix your approach so that you aren't GROUP_CONCAT()ing >1KB of string data.
    I'm running this query first:

    Code:
    SET SESSION group_concat_max_len=10000;
    And then my GROUP_CONCAT works fine. Ideally, yes. I'd like to change my approach so this isn't an issue, but working with a client who never mentioned needing this functionality 10 months ago when I gathered the requirements. They never mentioned it as I developed the project. They never mentioned it as I shared it and they started testing it.

    It only became an issue less than a week before they *needed* to launch the site. I never heard them mention this until it was really too late to build this properly and even after I implemented it, they told me to launch the site without testing it.

    There is absolutely nothing in my contract with them about this. Them *demanding* this work and me trying to make it work within an existing system should automatically grant me sainthood (not that I believe in such things).

    Anyway, sorry. Just venting. Customers on large projects with large dollar amounts think they own you and have no regard for process.
    “Be ashamed to die until you have won some victory for humanity.” -- Horace Mann

    "...all men are created equal." -- US Declaration of Independence
  6. #4
  7. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,727
    Rep Power
    4288
    at 0:20 -- "you think you own me? oh, i forgot, you do own me"

    https://www.youtube.com/watch?v=aQgCtSMs15Q

    the whole commercial is glorious
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  8. #5
  9. Plays with fire
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2003
    Location
    Barsoom
    Posts
    1,146
    Rep Power
    144
    Originally Posted by r937
    at 0:20 -- "you think you own me? oh, i forgot, you do own me"

    https://www.youtube.com/watch?v=aQgCtSMs15Q

    the whole commercial is glorious
    Okay, that's hilarious.
    “Be ashamed to die until you have won some victory for humanity.” -- Horace Mann

    "...all men are created equal." -- US Declaration of Independence

IMN logo majestic logo threadwatch logo seochat tools logo