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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:13:00+00:00 2026-06-18T16:13:00+00:00

I have a rather large mysql database table where one field is longtext, I

  • 0

I have a rather large mysql database table where one field is longtext, I wish to use compress on this field, would this result in diskspace reduction? or is the storage space already allocated and it won’t result in any space reduction. the storage engine is innodb.

  • 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-18T16:13:02+00:00Added an answer on June 18, 2026 at 4:13 pm

    InnoDB compressed row format has some prerequisites:

    1. innodb_file_format=Barracuda in your my.cnf file.

    2. innodb_file_per_table in your my.cnf file. The compression doesn’t work for tables stored in the central tablespace (ibdata1).

    3. Change a table to use compressed format.

      ALTER TABLE MyTable ROW_FORMAT=COMPRESSED
      

    Then the table should be stored in the compressed format, and it will take less space.
    The ratio of compression depends on your data.

    note: If you had a table stored in the ibdata1 central tablespace, and you restructure the table into file-per-table, ibdata1 will not shrink! The only way to shrink ibdata1 is to dump all your InnoDB data, shutdown MySQL, rm the tablespace, restart MySQL, and reload your data.


    Re your comments:

    No, it shouldn’t change the way you do queries.

    Yes, it will take a long time. How long depends on your system. I’d recommend trying it with a smaller table first so you get a feel for it.

    It needs to spend some CPU resources to compress when you write, and decompress when you read. It’s common for a database server to have extra CPU resources — databases are more typically constrained by I/O. But the speed might become a bottleneck. Again, it depends on your system, your data, and your usage. I encourage you to test carefully to see if it’s a net win or not.

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

Sidebar

Related Questions

I have a rather large mysql table that has the following structure: fieldid |
I have a rather large text corpus, of which I would like to check
I have a rather large diff of 2 GIT branches and would like to
I have a rather large database that has alot of decimal columns in alot
I have a data table populated from a MySQL database via PHP. The first
I have a large mysql table that I think might be using the wrong
I have a table in MySQL with a large amount of data that I
I'm about to start a new project which should have a rather large database.
I have rather large project that uses ICU regex classes. Basically it might run
I have a rather large SQL file which starts with the byte order marker

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.