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

  • Home
  • SEARCH
  • 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 8599683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:26:58+00:00 2026-06-12T01:26:58+00:00

Description: I have a huge MySQL database table. The total size is about 10

  • 0

Description: I have a huge MySQL database table. The total size is about 10 terabytes. It only contains texts.

A sample text from this database table:

In other cases, some countries have gradually learned to produce the same products and services that previously only the U.S. and a few other countries could produce. Real income growth in the U.S. has slowed.

There are about 50 billion different texts.

What have I tried?

I’ve tried to zip them all. Actually it has worked, reduced the total size. However, I need to make searching and I can’t search any data while they are located in a zip file.

I’ve tried PHP’s base64 encoding. It has made my sample text data as:

SW4gb3RoZXIgY2FzZXMsIHNvbWUgY291bnRyaWVzIGhhdmUgZ3JhZHVhbGx5IGxlYXJuZW
QgdG8gcHJvZHVjZSB0aGUgc2FtZSBwcm9kdWN0cyBhbmQgc2VydmljZXMgdGhhdCBwcmV2
aW91c2x5IG9ubHkgdGhlIFUuUy4gYW5kIGEgZmV3IG90aGVyIGNvdW50cmllcyBjb3VsZC
Bwcm9kdWNlLiBSZWFsIGluY29tZSBncm93dGggaW4gdGhlIFUuUy4gaGFzIHNsb3dlZC4=

What I’d like to accomplish?

I want to reduce text’s size before sending them to MySQL. First of all, I don’t know how I can do this job. I’m thinking of encrypting and decrypting the data.

So, here is an example what I want to do:

I want to encrypt text data before storing. Then, I want to call encrypted data from MySQL in order to decrypt.

Any way to reduce the size of texts? Base64 does not work for me, is there any other way?

  • 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-06-12T01:26:59+00:00Added an answer on June 12, 2026 at 1:26 am

    Please Note neither base64 nor encryption was designed for reduction of string length. What you should be looking at is compression and i think you should look at gzcompress and gzdeflate

    Example using decoded version of your text

    $original = "In other cases, some countries have gradually learned to produce the same products and services that previously only the U.S. and a few other countries could produce. Real income growth in the U.S. has slowed." ;
    $base64 = base64_encode($original);
    $compressed = base64_encode(gzcompress($original, 9));
    $deflate = base64_encode(gzdeflate($original, 9));
    $encode = base64_encode(gzencode($original, 9));
    
    
    $base64Length = strlen($base64);
    $compressedLength = strlen($compressed) ;
    $deflateLength  = strlen($deflate) ;
    $encodeLength  = strlen($encode) ;
    
    echo "<pre>";
    echo "Using GZ Compress   =  " , 100 - number_format(($compressedLength / $base64Length ) * 100 , 2)  , "% of Improvement", PHP_EOL;
    echo "Using Deflate       =  " , 100 - number_format(($deflateLength / $base64Length ) * 100 , 2)  , "% of Improvement", PHP_EOL;
    echo "</pre>";
    

    Output

    Using GZ Compress   =  32.86%  Improvement
    Using Deflate       =  35.71%  Improvement
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick method description: I have two tables, lets name them table ONE and table
trasaction table description field have some value it is worked fine. description feild default
I have a description text file with content constructed in such manner: Book title
I have a product table where the description column is fulltext indexed. The problem
I'm having huge problems storing encrypted info in a mysql database, engine mySam I
I have a question about database architecture. We are building a CMS. There are
Good day all, I have been learning about databases and database design and I
Description: I have a problem regarding DataGridView . I need to show a Client_Name
I have a field 'Description' which can have product descriptions with any unicode characters.
I have an NStextView that loads a description from a JSON source. The NSTextView

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.