Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 771933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:43:56+00:00 2026-05-14T18:43:56+00:00

It is crucial that I transfer the least amount of data possible between server

  • 0

It is crucial that I transfer the least amount of data possible between server and client. Therefore I thought of using the mysql Compress() function. To get the max compression I also want to concatenate all my results in one large string (or several of max length allowed by MySql), to allow for similar results to be compressed, and then compress these/that string.

1st problem (concatenating mysql results):

SELECT name,age
FROM users

returns 10 results. I want to concatenate all these results in one strign on the form:
name,age,name,age,name,age… and so on. Is this possible?

2nd problem (compressing the results from above)

When I have comstructed the concatenated string as above I want to compress it. If I do:

SELECT COMPRESS('myname');

then it just gives me as output the character ‘-‘ – sometimes it even returns unprintable characters. How do I get COMPRESS() to return a compressed printable string that I can trasnfer in ex ASCII encoding?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:43:56+00:00Added an answer on May 14, 2026 at 6:43 pm
    1. You might want to investigate a stored procedure which could build up a string internally and return that. By its nature, MySQL isn’t going to turn a ‘vertical’ query result into a ‘horizontal’ one for you, that’s not what a relational DBMS is for. That’s more of a display issue. The sole exception is using group_concat() if you’re doing some kind of join query with grouping.

    2. COMPRESS() returns a binary string, so no surprise that you occasionally get unprintable characters – it’s not intended to return something “readable”. As well, it adds 4 bytes to the compressed string to represent the length of the uncompressed string, so compressing 5 bytes or less isn’t going to save you anything.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently making an iPhone app that has PDF viewing a crucial part of
So I've been saddled with furthering a website, in which it is crucial that
I'm creating an application, mostly the UI design of it. However it's crucial that
Lets say that you are using a shared hosting plan and your application stores
One of the crucial requirements in the application I am writing is that user
What are the possible exceptions that can be thrown when XDocument.Load(XmlReader) is called? It
I am currently using a datagridview in C# that is working correctly. This datagridview
I have a Java process that opens a file using a FileReader. How can
I am designing a class... there are crucial methods that need an object passed
Suppose all that happens initially in a client swf is a user clicks a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.