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 8619657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:23:35+00:00 2026-06-12T06:23:35+00:00

Information : I am developing a PHP script for a school’s library. PHP script

  • 0

Information: I am developing a PHP script for a school’s library. PHP script will be running on localhost (XAMPP), it will not be open to internet.

What I’ve tried?

  CREATE TABLE IF NOT EXISTS `books` (
  `Id` int(11) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;

Database’s total size is 100 GB. 100 GB is big data size for this project. In fact, 10 GB – 20 GB would be great.

a-) Is there a way to compress the text data before storing it in the mysql? I’d like to make it 20 GB
b-) I’m willing to store the datas into a file. That would be great for me if file storage made my data size 20 GB. Is there a way to accomplish it?

  • 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-12T06:23:36+00:00Added an answer on June 12, 2026 at 6:23 am

    You can use the MySQL COMPRESS() function to compress data for storage and UNCOMPRESS() when you retrieve the result. This results in the data inserted into that column being compressed.

    Alternatively, you can compress the data on the PHP side prior to inserting into MySQL. To do that, the functions gzdeflate/gzinflate to use gzip compression or the functions gzcompress/gzuncompress which use zlib for compression (which is the same that MySQL functions use). Using these require that PHP is built with zlib support (--with-zlib).

    How useful these are depends on why the database is so large. If it’s because you have hundreds of millions of records vs. fewer records with large columns then compressing certain values is unlikely to make much of a difference. You will only see a reduction in database size if you have large data. From the looks of your table structure, there is no column that requires a lot of storage.

    For more information on what ROW_FORMAT=COMPRESSED does and its implications, see InnoDB Compression Usage.

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

Sidebar

Related Questions

I'm developing a long running php script that compiles scraped information from multiple sources,
I'm having an issue accessing raw request information from PHP when accessing a script
I'm developing a PHP web app that handles information about certain companies. So far,
I'm developing a script to grab some information from an external url. But I'm
I'm developing in PHP and MySQL. The information about the currently logged in user
I am developing small application in PHP that will need to store small number
I am developing software that loads information from XML files using Android's implementation of
I am developing a site in rails which requires information whether any analytics like
I'm developing a program which allows users to input some information which then gets
I'm developing an application that shows stock market information. In my application I use

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.