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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:55:33+00:00 2026-05-22T20:55:33+00:00

We have a very large (10million+) row table stored in MySql using the InnoDB

  • 0

We have a very large (10million+) row table stored in MySql using the InnoDB engine. Column ‘x’ is defined as ‘smallint(5) unsigned not null’.

Requirements have now changed since the original design a few years ago, and column ‘x’ needs to store a minimum datatype size of ‘int unsigned not null’.

We are allowed a “short” downtime to deploy the application (less than 5 mins) so any database change would need to fit within this time window if it requires the database table to be made temporarily unavailable in any way (e.g. full table lock). If the change can be done “online” then we can probably accept degraded performance for a longer period.

Has anyone here had experience of altering column type in MySql/InnoDB on a very large table? If so, did it go OK and roughly how long did it take (I realise this is hardware dependent, I am just trying to understand if what we are asking to do in the time window is even vaguely possible)?

Thanks in advance,

  • 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-22T20:55:34+00:00Added an answer on May 22, 2026 at 8:55 pm

    heres a recipe i’ve used

    where you have old column, a

    1. create a new column b
    2. create a trigger to update b on update/insert on a
    3. update b = a
    4. drop all fkey relations referencing a
    5. create fkey relations for b
    6. update code to use column b instead of a (deploy)
    7. drop triggers on column a
    8. drop column a

    repeat all steps if you must change the column name back.

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

Sidebar

Related Questions

I have a very large table with a fulltext indexed column. If I partition
I have a very large code base that contains extensive unit tests (using CppUnit).
I have a very large table with an indexed datetime field. I want to
I have two very large enterprise tables in an Oracle 10g database. One table
I have a very large database with about 120 Million records in one table.I
I have a very large table (374870 rows) and when I run the following
I have a very large table in Mathematica ((dimcub-1)^3 elements) coming from an inverse
I have a very large (millions of rows) SQL table which represents name-value pairs
I have very large datasets that are stored in binary files on the hard
I have a very large xml file which I have stored in a longtext

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.